Still getting "random" 500 errors in rails
Posted by: Nerdmaster
Posted on: 2005-12-30 14:09:00
I posted about this months ago (august or so) and got an attempt at a fix, but that didn't seem to do much. The problem is that my rails app will work perfectly most of the time, then intermittently get 500 errors just out of the blue. 99% of the time, hitting refresh on the 500 error will bring up the page you were trying to get in the first place.
The issue is not specific to dreamhost, but I'm curious if they're working on a solution. Here's some info I found from textdrive, and their proposed solution:
In reply to:
They are aware of the issue. We're going to need to run it under cgi, until they set up some more
apache instances and spread the FastCGI sites across them.
Apache is compiled with an FD_SETSIZE of 4048 (which means it can have
4048 file descriptors going), but FastCGI just won't stop thinking it
has the default of 1028.
So that means that ones access_log + error_log + php-fastcgi +
RoR-fastcgi adds up to 1028, then FastCGI dynamic apps will start
throwing a 500 error. And the solution is just to setup half-a-dozen
Apache installs with mod_fastcgi and spread the sites across them.
What they are doing over the holiday is building support for multiple
apache instances in our "control
panel", so it will be trivial to spread people across them.
If I'm reading this right, it sounds like anybody with a rails app could be randomly affected, and as more people use fastcgi on a given server, it becomes more and more likely they'll hit this problem.
Is DreamHost aware of this issue? Is it being addressed? When my app goes live (someday), I think it'll look pretty unprofessional to have every 10th or 20th page request pop up an error...