Joyent

Troubleshooting the Internal Server Error

Proxied applications

In case you have an application that is being proxied to from Apache, e.g. a Rails application running on Lighttpd, the important part is to determine where exactly is the error being triggered at. To answer this question, compare the output when you access your site over the proxy (e.g. http://www.domain.com/) and directly (e.g. http://www.domain.com:8001/).

If the site shows up correctly when accessed directly, it’s only happening at the Apache side, and you should skip to the next section on this page. If both show the same, it means that your proxied application setup is having the problem. Only Lighttpd based setups are known to suffer from Internal Server Errors, in case where the Lighttpd process runs correctly, but the FastCGI process (typically a Ruby dispatcher) is gone missing. You should log into the server, inspect running processes and actions and analyze your application’s log files to determine what the problem is. Also, your process might have been killed by the server if you entire account’s memory allotment was used up.

Executable scripts

  • Script which is not executable (the file lacks the executable bit).
  • Executable script which is not owned by your primary user.
  • Executable script (except for PHP scripts) which is group- or world-writable, or is stored inside a directory with such permissions. Our secure environment prevents such execution and you should make sure that the file does not have group or world write flag raised (typically chmod it to 755 or even 700).
  • Executable script which has Mac or DOS line endings (should have UNIX line endings).
  • Executable script which takes longer than a couple of minutes to execute.
  • Executable script which has an incorrect shebang line.
  • Executable script which throws an exception when running. Try trapping the exception in the code, and then displaying this on screen or using your logging framework to log or report the error.

Other cases

  • A syntax error in a .htaccess file.
  • A mangled .htaccess file (incorrect line endings etc.).
 
accelerators/kb/internal-server-error.txt · Last modified: 2008/01/26 23:12 by alexbcoles
 
Recent changes RSS feed Creative Commons License Driven by DokuWiki