Resource Usage issues

Hi everyone,



On the odd occasion I have one of my CS-Cart websites suspended by my web host for exceeding resource allowance. They never seem to be able to provide much information as to the cause, except to say it's using a lot of RAM, CPU or EP.



I'm not all that savvy with web development, I'm more of a frontend designer but I am able to get a CS-Cart site up and running entirely provided there's no custom PHP scripting required.



I'd like to get a better understand, by way of starting a discussion, about what causes these resource usage spikes. Particular since most of my sites are standard CS-Cart installations with nothing more than skin modifications.



Last ngiht for example, I had a site suspended for using too much RAM. I already had most unused add-ons disabled, but I did go in and disable a few more.



Can anyone shed some light on what sorts of things I should look into to optimise these sites for minimal resource usage? I know resource usage has been discussed in other threads but I found them not very helpful.



Thanks



EDIT: I should mention too…I'm migrating them all to a VPS this week, but I am still keen to optimise obviously.

If you need more resources, it is a good thing, it mean your store is growing. Hopefully for the right reasons. I'm not expert, but without knowing basic information is hard to tell.



What hosting company? What hosting package? how long your cart has been live? What cs-cart version? How many product? how many filters? Do you check visitor on google analytics? Are you getting more orders? etc.

If there's one thing I can tell it would be that it's not necessarily traffic related. I've had the suspensions occur on sites that are brand new with virtually no traffic. I really have a feeling it is more to do with cart performance and optimisation.



Hosting company - VentraIP (Australia)

Hosting package - “Business plan” with 25gb storage, unlimited bandwidth, running cPanel 11.30, Apache 2.2, PHP 5.3.10, 5.1 dedicated My SQL backend and CloudLinux



Site 1 - been online for 2 months, roughly 3 suspensions, using CS-Cart v2.2.3, roughly 3,300 products and 2 filters. This is a wholesale only site so only registrered users can purchase. It takes roughly 5 (large) orders per day. Average of 50 visitors per day and 50% of those are new.



Site 2 - been online for 6 months, roughly 3 suspensions, using CS-Cart v2.1.2, roughly 2,500 products and 5 filters. Retail webste which allows annonymous checkout. Since this is a new establishment with little advertising, it receives only around 3 orders per day. Averages approx. 50 vistors per day - 75% new.



Site 3 - been online for 14 months, only 2 suspensions. Virtually EXACTLY the same type of website as site 1 (including type of products, order quantity etc) only it uses v2.1.1.



All of the above are Pro versions by the way. Does this information help?

CS-cart uses a lot of ajax on every page load. There are some sites (mostly US government and large corporations) that utilize caching proxy routers for their outbound traffic. What happens is when a customer connects to your home page from one of these locations, the caching server tries to cache all the content from the links of of the page so that those pages are cached in the proxy when the user tries to access them.



Unfortunately, this can put quite a heavy load on your server assuming that for every page it reads there are really about 3-6 http page requests related to all the ajax calls (these are separate PHP processes to service ajax) and use of ajax is increasing with every version…



Because this is being done by a caching proxy (kind of like a robot), it tries to read the pages as fast as it can.



When I provided hosting, I had to block sites like the Naval Intelligence Center because of their caching server activity. It may better serve their users, but it's hell on small merchant sites.



Of course there are a ton of other reasons why you can have bursts of usage. If it's related to real customer traffic, it's a good thing and you should scale-up appropriately. But it can also be malicious attempts to hack into your store. If your host shuts you down, get very accurate timestamp info about when the load occurred and then go review your access logs to see what's beating on your store.

Let VentraIP know that they've lost a potential customer.



I'm concerned that you get VERY low traffic and they can't handle the server load.

If you are using 'Shared Hosting' it's more than likely that you need a well provisioned VPS or Dedicated server.



That said, VentraIP is really budget when you review their pricing.



J.

Ive been having these same problems now, having moved to a new server in Australia.

It seems that this problem is now more common due to a lot of shared servers now using Cloud Linux.

There are limitations of 20 “Entry Processes” allowed to be run at any one time. This is so restrictive for csCart websites because, as stated above , and in a few other threads, apparently, CScart uses ajax to load the index.php pages which can result in 3-6 processes running per visitor to the site.



So, as a broad sweeping statement, in its current form, (I must admit I havent researched whether cscart 3 has the same issues. We're stuck with 2.1.4) Cloud Linux enabled servers should not be used to host medium to heavy traffic cscart stores. Even tho' weve optimised the css, images, bad page links and managed to reduce the demand on system resources, our share of the CPU time is still often maxing out at 100%. And if we try to load another of our sites on this same server, we will surely be over the limit again.



Apparently there are some optimizations that can be performed. Most of which are way out of my current knowledge base and IMO should not be something that an online shop owner should be required to deal with.



May I suggest to the CSCART team that this problem be addresses very soon.:

  1. Perhaps a KB document be published detailing standard optimization methods for use with the now common Cloud Linux (if indeed any exist).
  2. Version 3 compatibility/optimization for Cloud Linux as standard.
  3. Minimum system requirements list for CSC hosting, with reference to Cloud Linux.



    Googling around the web, it looks like many hosting companies that have “upgraded” their hosting service to Cloud Linux are having these issues, closing down without warning, not only cscart stores, but WP blogs and other carts, simply because the particular client's chunk of the shared hosting has had 20 processes running!



    This means (as per our experience) that low-med traffic CSCart sites may fail to load some pages, causing visitor dissatisfaction, and sometimes the hosting account will be suspended due to the inability of the Cloud Linux server to cope with the number of processes that cscart is launching.

    This is forcing small traffic sites to upgrade to more expensive, dedicated IP, higher resourced business hosting accounts. However, I can imagine, that without some form of CSCart optimization, even a hosting account allowing 40 processes to run will still fall over under “medium to high” traffic loads, especially if more than one cscart stor, and a blog or two are loaded on the same account.



    If the cscart installation can be optimized to reduce resource usage, the CSCart team would do well to quickly publish a definitive Optimization Method for installations using Cloud Linux.