@grep; I wouldn't tie your flag to that mast :-P it has nothing to do with static files
Here is exactly how these errors occur, in detail:
- People are requesting pages, the server is running webDip scripts to respond to the page requests, everything is going smoothly.
- Another user of the same hardware, or many users in general, begin to use more server resources (typically database resources, i.e. intensive queries).
- The amount of time needed to respond to a page request increases, so it perhaps takes a second instead of 0.1 seconds, but it's still no big deal and things are going smoothly.
- Then the average amount of time to respond to a page request rises above a critical point; it rises above the average amount of time between page requests. (e.g. it takes 1.2 seconds to respond and a request is made every 1.1 seconds)
- Things still seem to be going smoothly, but requests are coming in faster than the webDip processes can respond to them.
- The total number of webDip response processes slowly adds up, as more requests are made than are responded to.
- Each webDip response process requires memory, and slowly the total amount of memory webDip is using increases.
- Eventually a point is reached at which our account has enough webDip response processes in action that our account is using more memory than it is allowed.
- The server detects this and shuts down as many webDip response processes as are required to bring our memory use back within our limits.
- Apache is informed that the response process has been terminated before giving a response, so it responds with a 500 internal server error code.
If only slightly more requests are coming than can be responded to 500 errors might come but very infrequently, if someone is really hogging the database you'll get nothing but 500 errors.
Note that while all this is going on you'll be seeing static 500 error pages full of images and things at lightening speed, because static requests use no memory and take no time at all (if they're not cached anyway).
So although I appreciate the suggestions I'm not speaking out of ignorance; there is no mystery about where the errors come from or why, or about what is needed to take care of them