Jump to content

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

Cs-Cart Cannot Handle High Traffic Rate Topic   - - - - -

 
  • jain1980
  • Senior Member
  • Members
  • Join Date: 16-Dec 08
  • 245 posts

Posted 07 May 2018 - 06:21 PM #1

Got a surge in traffic like 50 users at a time on our website and cs-cart couldn't handle it. Already increased the memory limit in php.ini to 3 GB but there's no change. Site has come to a crawling halt. What else can be done to fix this?

 

Is cs-cart not built to handle even moderate traffic? Really thinking of jumping to other scripts like Drupal or Magento. They are at least built for high traffic even if difficult to develop.



 
  • martfox
  • Member
  • Authorized Reseller
  • Join Date: 15-Jan 10
  • 548 posts

Posted 07 May 2018 - 06:42 PM #2

 

Already increased the memory limit in php.ini to 3 GB but there's no change.

 

If you are on a shared server, it won't help if there is a limitation on the server itself. That means, e.g if the server has 2 GB RAM, increasing the memory e.g. to 6 GB won't work.


CS-Cart with 1 Year FREE Web Hosting | CS-Cart optimized SSD Cloud VPS Servers from €10.00/month
.
VPS SSD Cloud from €10.00 *** Dedicated Servers *** CS-Cart Authorized Reseller and Web Hosting Provider


 
  • johnbol1
  • Never Re
  • Members
  • Join Date: 23-Feb 10
  • 4260 posts

Posted 07 May 2018 - 07:02 PM #3

Got a surge in traffic like 50 users at a time on our website and cs-cart couldn't handle it. Already increased the memory limit in php.ini to 3 GB but there's no change. Site has come to a crawling halt. What else can be done to fix this?

 

Is cs-cart not built to handle even moderate traffic? Really thinking of jumping to other scripts like Drupal or Magento. They are at least built for high traffic even if difficult to develop.

What info do you have to show it is CS carts problem (unlikely) and not your server environment


Custom printed hi visibility clothing sale the UK's online hivis safety shop
v4.5.2


 
  • jain1980
  • Senior Member
  • Members
  • Join Date: 16-Dec 08
  • 245 posts

Posted 07 May 2018 - 07:09 PM #4

I am on a VPS with 6 GB Ram. The CPU is being used up 80-100% by the cs-cart resources as per the server stats.



 
  • martfox
  • Member
  • Authorized Reseller
  • Join Date: 15-Jan 10
  • 548 posts

Posted 07 May 2018 - 07:18 PM #5

The CPU is being used up 80-100% by the cs-cart resources as per the server stats.

 

So the CPU is the problem. But probably not the CPU itself, but the I/O requests, DB etc. First the server needs be configured properly to work with CS-Cart (or any other application), then you can check another things and tweak the server/settings. Because it's not enough just install the OS and CS-Cart on it. It requires some tasks to be done manualy inside Apache, MySQL, PHP etc...


CS-Cart with 1 Year FREE Web Hosting | CS-Cart optimized SSD Cloud VPS Servers from €10.00/month
.
VPS SSD Cloud from €10.00 *** Dedicated Servers *** CS-Cart Authorized Reseller and Web Hosting Provider


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

Posted 07 May 2018 - 08:26 PM #6

If CPU is your bottleneck, why not have your hosting add additional CPU's to your VPS?

 

How much memory do you have allocated to mySQL?  On a 6GB instance I would suggest at least 2GB.  Note too that you should reassign the temp table space to NOT use /tmp since you don't have much control over what gets dumped in there and the risk of /tmp filling up can really be a problem when cs-cart creates temporary product tables in order to do searches and sorting.

 

How much is dedicated to file buffering?  For any web environment I'd recommend at least 25% of available phys mem to be dedicated to file buffers.

 

Note that the CPU usage will increase significantly if there are memory issues (like listed above) due to having to shuffle all that data around so that it fits within the allocations.  So on a 6GB instance, I'd suggest you allocate 2GB to mySQL and at least 1.5GB to file buffers.  That will leave you with 2.5GB for running your PHP/Webserver processes.

 

Note also, that by default Apache is not configured to adequately support 50 concurrent users (true concurrent).  So you will have to adjust the Apache configuration too which will also have an impact on your memory allocations.


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.


 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3575 posts

Posted 07 May 2018 - 09:18 PM #7

Could also be some sort of attack by anonymous bots.



 
  • jain1980
  • Senior Member
  • Members
  • Join Date: 16-Dec 08
  • 245 posts

Posted 08 May 2018 - 05:29 AM #8

Thanks Tbirnseth...invaluable info...Will pass this onto the developers.

 

If CPU is your bottleneck, why not have your hosting add additional CPU's to your VPS?

 

How much memory do you have allocated to mySQL?  On a 6GB instance I would suggest at least 2GB.  Note too that you should reassign the temp table space to NOT use /tmp since you don't have much control over what gets dumped in there and the risk of /tmp filling up can really be a problem when cs-cart creates temporary product tables in order to do searches and sorting.

 

How much is dedicated to file buffering?  For any web environment I'd recommend at least 25% of available phys mem to be dedicated to file buffers.

 

Note that the CPU usage will increase significantly if there are memory issues (like listed above) due to having to shuffle all that data around so that it fits within the allocations.  So on a 6GB instance, I'd suggest you allocate 2GB to mySQL and at least 1.5GB to file buffers.  That will leave you with 2.5GB for running your PHP/Webserver processes.

 

Note also, that by default Apache is not configured to adequately support 50 concurrent users (true concurrent).  So you will have to adjust the Apache configuration too which will also have an impact on your memory allocations.



 
  • jain1980
  • Senior Member
  • Members
  • Join Date: 16-Dec 08
  • 245 posts

Posted 08 May 2018 - 05:36 AM #9

 

Note also, that by default Apache is not configured to adequately support 50 concurrent users (true concurrent).  So you will have to adjust the Apache configuration too which will also have an impact on your memory allocations.

 

Going forward, what webserver should we switch to? Nginx? What should be the ideal server setup which can handle high traffic as we are expecting traffic around 500 to 600 actual concurrent users in the near future.



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

Posted 08 May 2018 - 05:38 PM #10

All depends on your needs, your expertise, your willingness to pay for support and your desire to do detailed research.  Personally, I stick with Apache since it's tried and true for decades even if it has a bit more overhead than some others.


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.


 
  • soft-solid
  • Junior Member
  • Members
  • Join Date: 19-Apr 10
  • 316 posts

Posted 14 May 2018 - 02:12 PM #11

You should change enviroment on nginx, php-fpm on ssd disc.


Team of SoftSolid
cs-cart.pl

 
  • martfox
  • Member
  • Authorized Reseller
  • Join Date: 15-Jan 10
  • 548 posts

Posted 14 May 2018 - 02:46 PM #12

You should change enviroment on nginx, php-fpm on ssd disc.

 

Generally and again: It won't help any nginx, sdd and fpm if the I/O things are not tweaked right and if there isn't enough CPU power and RAM.

 

BTW the speed difference between Apache and Nginx is so small, that it isn't worth to swith to and risk some usual 502 errors (502 Bad Gateway NGINX).


CS-Cart with 1 Year FREE Web Hosting | CS-Cart optimized SSD Cloud VPS Servers from €10.00/month
.
VPS SSD Cloud from €10.00 *** Dedicated Servers *** CS-Cart Authorized Reseller and Web Hosting Provider