Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Admin Gone Very Slow Rate Topic   - - - - -

 
  • dhmholley
  • Member
  • Trial users
  • Join Date: 15-May 13
  • 26 posts

Posted 31 January 2017 - 10:21 PM #1

Our admin pages have suddenly become very slow to load. I've checked the server usage and we're well below limits. Also the front end seems to be ok. Does anyone have any ideas?



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11442 posts

Posted 01 February 2017 - 01:07 AM #2

Check what 3rd party addons you have that might be making remote calls to sites that may not be responding (like Twigmo).


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19954 posts

Posted 01 February 2017 - 08:24 AM #3

Add "?debug" to the URL in the admin panel.  Check SQL section in the debugger. May be you have some incorrect sql queries


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • mazter
  • Senior Member
  • Members
  • Join Date: 04-Apr 12
  • 275 posts

Posted 01 February 2017 - 05:48 PM #4

I'm seeing this query in the SQL section but it takes almost a second to finish. Do you understand the logic behind running this type of crazy query to load admin panel page?

 

 

SELECT SQL_CALC_FOUND_ROWS products.product_id, descr1.product as product, companies.company as company_name, IF(COUNT(IF(cscart_categories.company_id = products.company_id, NULL, cscart_categories.company_id)), 'Y', 'N') as is_shared_product FROM cscart_products AS products LEFT JOIN cscart_product_options_inventory as inventory ON inventory.product_id = products.product_id  AND inventory.amount <= 0 LEFT JOIN cscart_product_descriptions as descr1 ON descr1.product_id = products.product_id AND descr1.lang_code = 'en'  LEFT JOIN cscart_product_prices as prices ON prices.product_id = products.product_id AND prices.lower_limit = 1 LEFT JOIN cscart_companies AS companies ON companies.company_id = products.company_id  INNER JOIN cscart_products_categories as products_categories ON products_categories.product_id = products.product_id INNER JOIN cscart_categories ON cscart_categories.category_id = products_categories.category_id   LEFT JOIN cscart_product_popularity as popularity ON popularity.product_id = products.product_id WHERE 1  AND products.tracking IN('B', 'O') AND IF(products.tracking = 'O', inventory.amount <= 0, products.amount <= 0) AND prices.usergroup_id IN (0) GROUP BY products.product_id


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11442 posts

Posted 01 February 2017 - 10:26 PM #5

It's really not that crazy a query if you break it down.  Effectively it is getting a listing of products based on your company_id for those products that are unique to your storefront and that are shared between storefronts..

 

How many products do you have?  This query should take a second.

Do you have adequate memory on your server to support the high demands that cs-cart places on mySQL?

Do you have fast disks (SSD) so that indexes are read quickly?


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • mazter
  • Senior Member
  • Members
  • Join Date: 04-Apr 12
  • 275 posts

Posted 02 February 2017 - 04:07 AM #6

It takes 0.3 seconds just for this query for 10 products only. I have 3300 active products at the moment. I have only one storefront so not sure if it is even necessary.

 

The server has 8GB memory and Mysql has configuration to go up to 6.5 GB memory. The whole server hardware has been dedicated to one website. You hit the nail on SSD. HDD is the bottleneck for performance at the moment and I'm looking into getting a new dedicated server but even with a new server, I still can't get the idea behind to write a humongous query just to query 10 products. I looked into "EXPLAIN" section of phpMyAdmin, most of this query is using non-indexed sections of the tables, that's why it is filling up slow_query.log on Mysql. This query runs on the homepage as well and it takes around 0.35 seconds on average to query only 10 products.



 
  • mazter
  • Senior Member
  • Members
  • Join Date: 04-Apr 12
  • 275 posts

Posted 03 February 2017 - 03:18 PM #7

It's really not that crazy a query if you break it down.  Effectively it is getting a listing of products based on your company_id for those products that are unique to your storefront and that are shared between storefronts..

 

How many products do you have?  This query should take a second.

Do you have adequate memory on your server to support the high demands that cs-cart places on mySQL?

Do you have fast disks (SSD) so that indexes are read quickly?

 

Tony, you were right. I upgraded our server with 256GB SSD hard drives. It is much much better now.

 

Thanks



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11442 posts

Posted 03 February 2017 - 09:00 PM #8

Glad it worked for you.

In cs-cart, Memory is your best friend with fast disk a close 2nd place.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.