New Zenner
- Join Date:
- Aug 2013
- Posts:
- 44
- Plugin Contributions:
- 0
Server Resource Usage High On New and Old Versions of Zencart
I recently migrated several Zencart installations from Shared Hosting to a new VPS server, running AlmaLinux 9, Cloudlinux (for older php versions) and cPanel. On the previous server, which was shared hosting, there were multiple php versions running, including php 5.6 for an older installation and php 8.2 for all new installations. The reason we had to migrate has to do with the problem that we are now experiencing, where the older Zencart installations are using all of the server resources. The older zencart version is 1.5.0, running php 5.6. The newer version is 2.1.0, with only one or two plugins and running php 8.2.
These two zencarts are sharing a server with several Wordpress sites as well. When the zencart sites, of either version, are active, it quickly overloads the server. All of the wordpress sites are completely up to date, and there are no issues running them until the zencart sites are running as well. So, if I have the wordpress sites only loaded, I can visit multiple sites and pages of each site with no issue, even if it is a little slow. But as soon as one of these two zencarts is activated, particularly the 1.5.0 site (that one is on php 5.6, which may be part of the issue), the server begins to overload. With the older version, I visit three pages on the server, one of which is the zc, and within three visits, the server returns a messge "Resource Limit Reached." I have the resource allocation quite high for this cpanel user.
One of the sites, which is the only zc installation currently active on the server, is version 2.1.0, which is a later version. If I visit that site and then other sites on the server, and then this zencart site again, it get a "Internal Server error" message. The whole server is slowed down as well.
Regarding the second zencart site, which is much older, there are multiple issues, and I am not sure how they can be resolved. The version for this site is 1.5.0, running php 5.6. When this site is activated, after visiting any site on the server three times, the server comes back with "Resource usage limit reached," and nothing will load. As a result, I have deactivated this particular ZC until a resolution can be found. It is running on the same server described above, with very high resource usage allocation for the cpanel user assigned via whm.
When the version 1.5.0 site is running, and even when the folder has been renamed and it isn't actually running, something (probably a bot) visits multiple pages every second, all of which have a product name in the url followed by &zen_id= followed by a random number string, for example: [url/product name?zenid=duivb82fo1bh9k0l75rngpksk2]. This is verified within the cpanel visitors tool (this is where they are found). When this older version is running, the htop tool in putty also shows dozens of php cgi spin-ups for the php 5.6 version (without which this older version of ZC simply crashes). It should be noted that a different type of software site on this same server, OS Class, is also running php 5.6 by necessity, and these issues do not occur when that site is visited. They only happen when the ZC sites are active.
This site itself is also protected by cloudflare, with bot attack mode activated on both of these ZC sites, so these bot visits should be getting stopped, but they are going by the filter and then they quickly bog down the whole server. So I am trying to understand what is happening, why these two sites are using so many resources, and how this can be stopped. Both of these sites have many pages that were created in the database, and the older one has thousands of photos and listings in the file structure. It also had many css modifications and plugins that are not easily transportable from such an old cart to a much newer cart structure. All of the design functions and page structures used in Zencart have been modernized in the newer version, making it difficult to actually port an older site.
The newer ZC update described above was from a site with very few products and little css (it wasn't even mobile friendly), so that one was an easier upgrade. For the other one that is still old, it doesn't sell any products, but there are many modifications and plugins, making an upgrade time consuming. So I am trying to get these sites to function on the older versions, with the old php, without bogging down and crashing the server while we prepare for a full upgrade. Any help you can provide would be greatly appreciated. Thanks!