Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have Lighttpd on Centos 5 with Fcgi and Memcached. Periodically, once per week or two i get internal server error 500 and i must manually restart lighttpd to get it to work again.

In my lighttpd config I've defined error log file:

server.errorlog             = "/home/lxadmin/httpd/lighttpd/error.log"

But when I open it, it has no rows for last days, only one month ago.

So my question is how to diagnose what is the issue and how to enable error log for my configuration?

share|improve this question

3 Answers 3

up vote 2 down vote accepted


nano /etc/lighttpd/lighttpd.conf

And put:

fastcgi.debug = 1
share|improve this answer

My guess is that the problem is related with trouble connecting with the fcgi processes. Have you tried to strace lighttpd process when the internal server errors are happening? That should give you a clue of what's happening. Try something like this:

strace -p pidof lighttpd -o strace.output

then take a look at strace.output.

Hope this helps.

share|improve this answer
Thank you I will try this and come back with results –  tomaszs May 12 '10 at 9:22
And by the way, check if lighttpd has permissions to write to the error_log. Might be an issue as well. –  Marco Ramos May 12 '10 at 10:37
How can I contact with you in private? –  tomaszs May 12 '10 at 13:34
@Tomaszs: direct message me on twitter (@mramos29) –  Marco Ramos May 16 '10 at 23:34

Just restart lighty on nightly basis...problem fixed. Could be a memory leak issue occurring over time!

share|improve this answer
When that's required it might be time to look for a new web server... Nginx and Cherokee being prime candidates. –  Martin Fjordvald May 11 '10 at 16:49
@Martin F I think that if lighttpd can serve to 1000 reqs per second (redmine.lighttpd.net/wiki/lighttpd/PoweredByLighttpd), than changing it is not the point here, while I have max. 10 reqs per second! –  tomaszs May 12 '10 at 9:21
@Ma Diga It's a solution, hope that I can find this leak or something also. –  tomaszs May 12 '10 at 9:34
Many web servers can handle 1000 reqs per second... But my comment was not to you, but rather to the solution Ma Diga suggested. If you have to restart your HTTP server nightly then things aren't working, and yes, changing is a damn good solution. Lighttpd is well known for leaking memory like a person with a bad case of Alzheimer's disease. –  Martin Fjordvald May 12 '10 at 12:17
@Martin F - It's interesting, if Lighttpd is so leaky, how this websites: redmine.lighttpd.net/wiki/lighttpd/PoweredByLighttpd work? Nevermind, I have a real situation here, not a academic one. –  tomaszs May 12 '10 at 13:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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