Fast-CGI Issue

Ed Johnson

08 Feb 2009 15:36

Yesterday, I was working on a new wiki site on my server at work and just about had a heart attack after saving a page and returning to my index page. I got the dreaded

500 Internal Server Error

The page had actually saved fine. The problem was with my index page that had a ListPages module that was doing some fancy includes based on this thread on the community site. I inspected the server logs and found this type of entry for every 500 error:

2009-02-07 15:04:13: (mod_fastcgi.c.2471) unexpected end-of-file (perhaps the fastcgi process died): pid: 6075 socket: unix:/var/run/lighttpd/php-fastcgi.socket-3

2009-02-07 15:04:13: (mod_fastcgi.c.3281) response not received, request sent: 1089 on socket: unix:/var/run/lighttpd/php-fastcgi.socket-3 for /index.php , closing connection

I was able to manually delete the "broken" page by using pgAdmin3. BTW, I love how nice PostgreSQL is when deleting records with dependencies. It deletes data in related tables without making a fuss.

After rebooting my server, I tried one more time to recreate the index page as it was just to make sure it wasn't some kind of fluke error. Same result. Now I'm in way over my head. Since the error log indicated "(perhaps the fastcgi process died)", I decided to try giving more memory to php-cgi. I increased my memory limit in the php.ini file here (was 32M):

; Resource Limits ;
max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 64M      ; Maximum amount of memory a script may consume (16MB)

This seems to have solved my problem. I'm not sure if I should be looking at anything else or making other config changes. At this point it's working, so I'm going to mark this as "solved for now". I updated ubuntu-8-04-with-lighttpd-install to indicate this change. I'll be doing the same with my next Installable ISO


Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License