Backtracking a 500 error


(Douglas (@finnatic at @waikato)) #1

Matrix Version: 5.4.5.1

I’ve seen one of our Matrix instances return a 500 status code for a page load, and confirmed there’s an Apache access log record for that 500 status error.

There’s nothing recorded in the Apache error log, and nothing in the matrix logs.

Is there any way to backtrack and assess what went wrong other than those logs?


(John gill) #2

I’d expect to see something related to a 500 in the error.log files, but as far as I know the only way to find it is by matching the timestamps and guesswork.

If it was a PHP exception that didn’t get caught by Matrix maybe there’s something in php’s logs (php-fpm? I’m not sure how Matrix is set up with Apache).

Alternatively, maybe the 500 was generated by Apache and the request never reached Matrix at all. Without being able to reproduce it that would be tough to verify.


(David Schoen) #3

John’s basically right. If Apache executes via FPM, PHP will have a separate error log just for the FPM daemon and depending on FPM configuration errors may either write to php-fpm’s logs or Apache error logs. If you’re using mod_php with Apache, Apache’s error logs are the only place to worry about.

Failing that, I think some segfaults will show up in unix syslog but not the other error logs depending on how Apache is configured (but these are generally impossible to reproduce just from logging info).


(Douglas (@finnatic at @waikato)) #4

Thanks for the responses.

I don’t believe the server in question is using FPM, and apache’s logs lacked any useful details, but we’ve had a few front end errors show in _admin, and I suspect they’re connected.

Have a server restart, VM move + additional memory allocation upcoming later this week, so will see if that remedies the issues.