Technology Insights

503 Service Unavailable Error After Switching Litespeed Rails Site From Production Mode To Staging Mode

Earlier I switched one of the Litespeed web server virtual hosts from production mode to staging mode and after gracefully restarting rails was receiving a 503 Service Unavailable error. Initially I thought that maybe Litespeed had to be restarted completely instead of just a graceful restart but that produced the same results. Below I describe the errors including errors in the Litespeed logs as well as how to resolve the issue which ended up being a silly mistake on my part.

Technology Errors

connection to [uds://tmp/lshttpd/example-site:_.sock] on request #0, error: Connection timed out!

I noticed this error during a deployment of numerous servers that were configured with litespeed, postgreSQL, and ruby. The installation process was to install ruby, install ruby gems, install postgreSQL, install litespeed, and then sync up the web directory using SVN. After doing so connect via a browser to the server to test things out. On one server I was getting a “503 Service Unavailable” error. The lshttpd(litespeed) logs looked like the below example.