Question

I'm working on debugging a slowness issue I've got with running ExpressionEngine (a PHP application) on IIS 7.

I don't think this is actually an issue with ExpressionEngine, but rather an issue with my PHP/MySQL setup.

The problem shows itself thusly:

  1. Go to webite address
  2. IE "spins" for 10-15 seconds, waiting to load. During this time:
    • processor usage is minimal on the server, and PHP's process is inactive
    • I see a connection for the site user in MySQL, but the thread is in "sleeping" more.
    • There is plenty of free memory on the server
    • pretty much, the server is doing nothing
  3. After 10-15 seconds, I see the connection MySQL run some really quick queries (very fast) and the site loads in under a second.

This is a fairly complex site, but it doesn't make any sense that the whole system is just sitting there waiting for 10 seconds - not processing anything. I'm using FastCGI on IIS7, which seems to be working fine, and to me this seems like some sort of a timeout issue where FastCGI, PHP, or maybe even MySQL is waiting for something, not getting it, and after the timeout occurs, continuing to process.

Anyone had similar experiences?

Thanks!

P.S. - I should also add that the database (MySQL) and PHP are running on the same server.

Was it helpful?

Solution 3

I have no idea why, but the solution to this was to install PHP 5.3. I had PHP 5.2.10 running, and I guess 5.3 added some extensive optimizations for Windows. Or fixed some other weird problem - who knows.

Actually, after some further digging, it appears the problem was with the Twitter plugin. It waits 25 seconds to come back from Twitter sometime with an error. Maybe this is related to the DNS?

OTHER TIPS

mysql might be trying to do a reverse DNS on the connection from the web server. if you don't need to filter mysql connections by DNS name, then add skip-name-resolve to your mysql configuration file

Twitter plugins cause lots of issues in CMS systems. usually there is a function that checks if twitter is there/alive. When twitter gets busy, this slows down the system (thats why it can appear as intermittent) Find the twitter plugin, and the routine that checks if twitter is there. Comment out this code and return true (ie. don't ask twitter if it is there, just assume it is)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top