1

We have a Magento 1.9.2.4 site. We are accessing it on using a subfolder and subdomain as http://dummysite.com/magentosite and http://magentosite.dummysite.com

Here we would live to mention that our main site dummysite.com is made in core php and project is listed in public_html directory. Now we now want to make our magento site on main domain so we are writing following code in htaccess of public_html folder.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?dummysite.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^(www.)?dummysite.com$
RewriteCond %{REQUEST_URI} !magentosite/
RewriteRule (.*) /magentosite/$1 [L]

It is working fine, our site is now accessing magentosite. Now the issue is when load or traffic comes, server goes down. Our server have a 64GB RAM, and 1.44 TB Hard Disk with CentOS 6.8.

By checking in mysql with show processlist; it is showing queries in SLEEP STATE. Within 3 hours server goes down. It is only happening with my magento site on main domain. If we revert it to old php site no SLEEP STATE under mysql.

We have found various concerns to overcome this issue: 1. By Clearing full page Cache. 2. By Enabling Flat Table of Product Images

We have tried all of them but still same SLEEP STATE

Also there is nothing helpful recorded in log.

Is there anything which we need to follow before making Magento site live by using this process. We can only make live site by redirecting it using htaccess.

  • I can't make too much from it but my guess would be some module that is choking your application since the resources should be sufficient. You didn't mention CPU but if you're sporting 64G Ram in your server I'm guessing that should be fine as well. Check the MySQL slowquery log, or turn it on if it's not there. you'll probably find some query that is being triggered on home or a category page that kills the site under traffic – Sander Mangel Apr 17 '17 at 9:07
  • @SanderMangel Yeah! Slow query can be great idea in this hurdle. I am just checking whole sql error log. I will check slow query log and put my working solution if I find. Thanks for valuable suggestion. – Nidhishanker Modi Apr 17 '17 at 9:58
  • @SanderMangel I have seen slow query log and found that not a single query is registered in it. I observed that by clicking homepage doesn't make server down with sleep query but When I try another pages it make SLEEP QUERIES in the count of 50-60. I am not sure why Magento queries are creating such issues? I am using Magento codes to get product collection and other details. Suggest if any solution I must try in case. – Nidhishanker Modi Apr 19 '17 at 6:36

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.