Cs-Cart Cannot Handle High Traffic

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.

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.

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

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.

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...

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.

Could also be some sort of attack by anonymous bots.

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.

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.

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.

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

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).