Wednesday, June 22, 2011

Random slow page loading and timeouts resolve!

It took me 2 weeks, but I finally solved a issue that was causing slow page loading and timeouts during peak hours.  This issue caused mininum impact (1-2 minutes) to myVidster, which was the reason why it took so long to resolved.  Being the only developer forces you to prioritize tasks and this was not a critical issue.

By default Apache rotates its logs every 2 hours.  When this happens it issues a graceful restart to the Apache service.  During peak traffic, the Apache service can take a few minutes to catch up to users requests causing slow page loading and timeouts.  I did not notice this because graceful restarts does not reset the server uptime when monitoring the Apache server status page.  It was not notice till I drive into the Apache error_log and saw that the graceful restarts were happening in 2 hour intervals.

As with most issues, a simple Google searched reveal the solution.  Enabling Apache's Piped Logs resolved Apache's need to perform a graceful restart to rotate the logs.  I also made a few tweaks to the logging service to reduce the amount of useless and redundant data that was being logged.

For the end user, this should resolve the periods of slow page loading and timeouts that has been occurring during peak hours.  As always I continue my efforts to make myVidster an enjoyable social experience.

380 comments:

«Oldest   ‹Older   401 – 380 of 380
«Oldest ‹Older   401 – 380 of 380   Newer› Newest»