1

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?

EDIT: update

I've discovered that the problem can be avoided if I comment out this line in .htaccess:

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?

  • as you can see you have something really bad in your code. you need to strace your php processes to see whats inside. – user2857 Jun 10 '15 at 15:23
  • @ADM what would you recommend I use to trace Magento code? – Buttle Butkus Jun 10 '15 at 22:15
  • Aoe_Profiler github.com/AOEpeople/Aoe_Profiler – user2857 Jun 11 '15 at 11:24
  • @ADM thanks, I will check it out. Also, I found some more clues about the problem - see my edit. – Buttle Butkus Jun 11 '15 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.