So much for the easy setup of Redmine, our server gazed at me with a 500 Internal Server error the following monday morning.

To track down the error, I started out by tailing Redmine’s error log that I previously defined in /etc/lighttpd/lighttpd.conf, showing:

$ tail -f /var/log/lighttpd/redmine_error.log
2010-12-20 12:09:04: (mod_fastcgi.c.2582) unexpected end-of-file (perhaps the fastcgi process died): pid: 6425 socket: unix:/tmp/redmine.socket-0
2010-12-20 12:09:04: (mod_fastcgi.c.3367) response not received, request sent: 909 on socket: unix:/tmp/redmine.socket-0 for /dispatch.fcgi?, closing connection                                                                          
2010-12-20 12:09:04: (mod_fastcgi.c.1734) connect failed: Connection refused on unix:/tmp/redmine.socket-3
2010-12-20 12:09:04: (mod_fastcgi.c.3037) backend died; we'll disable it for 1 seconds and send the request to another backend instead: reconnects: 0 load: 1

What I did to solve it was (after some googling) to change the lighttpd conf setting for Redmine’s socket from /tmp/redmine.socket to /tmp/lighttpd/redmine.socket. Before I could do that, I had to

$ sudo mkdir /tmp/lighttpd
$ sudo chown -R www-data:www-data /tmp/lighttpd

to make sure it was going to be writable. Restarting lighttpd after that seems to have solved the issue, permanently I hope.