PHP is suddenly super slow PHP is suddenly super slow apache apache

PHP is suddenly super slow


Some suggestions:

  1. Install Fiddler on the client.This will allow you to analyse thelow-level HTTP traffic coming fromthe server.

  2. Extract some of the queries fromyour PHP code and run theminteractively in the MySQL clientand see if they're running slowly.

  3. Log into the server (or get asystem administrator if you don't have access)and run the Task Manager (Windows)or top (Unix) and make surethere's nothing else hogging theserver. If you haven't changedanything, maybe something else haschanged on the server. Also, checkthe server logs/ Event Viewer.

  4. There is a Zend extension calledAPD that you can install on theserver (again, assuming you haverights), and it will profile your PHPcode and write out a file showingwhat functions are being called byyour PHP scripts are how long PHP isspending in each function.


Look for areas that might cause blocking, like shelling out to curl or opening a file over NFS in the code. If the remove system is timing out, it will drastically affect Apache performance as each request ties up the server for however many seconds it takes to time out and fail the lagging request.


Did you change any network settings in your development setup recently? If so, you might encounter one of Mozillas IPv6 bugs. See this blog entry (taken from this question & answers) for details, and this mozillaZine article for more details and a quick option to test it.