I recently updated some code on a staging server and now one link in the app throws an Internal Server Error...

There have been no changes to the .htaccess in doc root, but to remove this from the equation, I removed the .htaccess to test and no go.

Apache2 logLevel has been changed to debug and nothing is being logged. (watching tail -f /var/log/apache2/error.log and loading the page does not append anything to the log).

This code is running perfectly well on our development server. I know thats not much to go by.

Without the logs, I am stumped. Ths is a fairly complex app and without logs I simply cannot work out what the issue is.

Any help is much appreciated. Thanks in advance.

  • How is the application implemented? Is it CGI? mod_perl/mod_python? PHP? Rails? Java servlets? Jun 3 '09 at 6:52
  • I'm sorry David, I missed your comment here.
    – Christian
    Jun 3 '09 at 7:24

Ok guys, looks like it was just IE throwing the 500. Loading the page in Firefox shows a nice PHP parse error (the app is only supported in ie, so I had to switch my user agents to test).

For the record, I went through all my vhosts so make sure the logs were all correct, which they were, I'm still not sure why I was getting nothing logged.

Thanks for the help!

  • Recent browsers tend to omit the error message sent by the webserver when they encounter an 500 error.
    – cstamas
    Jun 3 '09 at 7:11
  • Browsers throw 500 errors? That doesn't sound right at all.
    – Xerxes
    Jun 3 '09 at 7:23
  • No, the server is throwing a 500 error, but IE helpfully hides error messages sent from the server with its own error page. You can turn it off in the options, but does massively interfere with getting good problem reports from customers. Jun 3 '09 at 7:39

A 500 usually means that some CGI that you're calling is failing, so it's not always easy to get useful logs - if you know what CGIs are being called, you can try and get them to do their own logging and see what you find.

Having said that, you should definitely get some messages in the logs, because just by virtue of the fact that you are getting a 500 - that means that the web server has spotted the error and sending you a 500 message. So you should also check that it's actually logging to what you think it is logging to.

  • If I do an ls -lat in the log dir after trying the link again, the only logs at the top have no entries relating to apache. I have double checked my 'debug' log level in my conf too. I have no idea why I am not getting anything logged... Just did a df -h too, lots of available space.
    – Christian
    Jun 3 '09 at 6:50
  • It's usually helpful to find where the error logging is going by checking where the access logs are going. If you have different logging for different vhosts, you might discover you're not hitting the vhost you think you are, with the result that logging isn't going where you think it should. Jun 3 '09 at 6:51
  • 1
    Try doing a find /var/log/ -mmin -1 right after doing a refresh on the page that returns the 500.
    – Xerxes
    Jun 3 '09 at 7:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.