blogsport in trouble

Due to increasing traffic at blogsport my server hosting this service ran into trouble more and more as it’s got not enough RAM as an increasing number of apache processes kept eating it up. Sure I just could have spent some money into new hardware but this seemed not to be adequate to me as I don’t make profit with this service.
My idea was to replace the somewhat outdated apache1.3 with an apache2 running in threaded mode (the mpm-worker model). Unfortunately I discovered that mod_php is not compatible with this. After some investigation I decided to switch nevertheless using mod_fcgid to run php5. Everything worked smooth except when it came to new postings. Postings did get filled into the DB but a “premature end of script headers” caused an Internal Server Error and stopped the show.
After a lot of debugging I found out that the reason for this were calls to fgets() and fputs() respectively. Despite intensive googling nothing showed up that seemed to match this topic so I wrote a quick mail to the author of mod_fcgid who gave my the tip to play around with timeouts and after setting ‘IPCCommTimeout’ for mod_fcgid the error seemes to be gone indeed now.

Current mood: happy again 🙂

Some more notes: RAM usage has decreased dramatically now, system responsiveness is fine again, regular outages seem to have gone.

Comments are closed