Using PHP 5.5 and MySQL 5.6 with magento 1.7 on Centos server.
When navigating to my site "example.com," an endless supply of PHP and MySQL processes are started. In can take minutes for a page to load on my browser, if it ever does. On the server, from the command line, using
top I see PHP processes multiplying. Logging into MySQL, I see that it also is bogged down with an ever increasing number of sleeping processes. And in Magento's
var/session/ folder, a new session is created at least once per second. If I run
ls | wc -l repeatedly, I can see the number of sessions going up very quickly.
And I can solve the entire problem by simply adding a
deny from [server's own ip address] in the magento
.htaccess folder. After doing that, and restarting MySQL and Apache and clearing out all the zombie sessions, the site works perfectly. That's great, but it doesn't explain how this is happening, and it makes me worry that there could be side effects I don't know about.
Does anyone have any idea what is going on?
I've discovered that the problem can be avoided if I comment out this line in
RewriteRule .* index.php [L]
That allows me to access the home page without any problem. Catalog pages stop working because Magento's rewrite option is turned on. Turning it off makes them work, but also adds the ugly "index.php" back into all urls.
Does this give any clues as to what the problem is?