Hi
We are running opencart v 1.5.5.1 (for the past 4 months)
Suddenly the hosting company sent the below notice
--------------------------------------
Hello,
During the routine monitoring of the server we found that your account was utilizing excessive resources. The details are given below as:
NPROC USER CPU MEM
152 xpressio 0.00% 29.90%
As a result we have to suspend xpressio to make the server load stable.
xpressio 410 0.0 0.2 25104 9584 ? S 02:41 0:00 /usr/bin/php /home/xpressio/public_html/admin/index.php
xpressio 609 0.0 0.2 25576 9588 ? S 00:03 0:00 /usr/bin/php /home/xpressio/public_html/admin/index.php
xpressio 649 0.0 0.2 25424 9880 ? S 02:42 0:00 /usr/bin/php /home/xpressio/public_html/index.php
........ and goes on
the above 2 files seem to be taking up too much resources
Here are the most common causes for high usage:
- your scripts are not upgraded: you may have not upgraded your scripts yet, as older versions of the scripts can have bugs in them that would cause high CPU and Memory usage
- your scripts are configured incorrectly: you might need to check your scripts configuration for any tweaks of settings available that might influence the usage, as a single wrong setting might do a whole lot of harm
- your plugins are misbehaving: some plugins might cause high load because they were badly written. You might consider disabling them or finding alternatives for some plugins
- bots are flooding your site: your pages might have been found by spam bots that try continuously to send messages via your contact form, or add various comments to your items and such, depending on your site's configuration. An implementation of a CAPTCHA system would be useful to keep bots out of your pages, while checking for the highly accessed webpages using the tools provided by CPanel.
- you might need caching: a caching plugin will help in most cases as it will serve pre-generated html pages instead of using the resource intensive PHP scripts to generate the same page over and over again for different visitors of the site.
---
Best regards.
Vivek P.
System Administrator
Level 2
------------------------------
can you advice a solution and where the issue might be ?
Siv
It's almost impossible to guess from the information above and unfortunately on shared hosts you frequently don't have the ability to see what is actually using all the cpu time in real time.
You'll want to examine your log files and see if you are getting any unusual amount of requests. Check your php files to make sure they haven't been hacked (adding additional load).
Of particular concern is your admin/index.php. If you aren't doing a lot of administration, it could indicate hacking attemps or exploits have been added to your code. It can be a good thing to lock down your admin directory using htaccess to only be accessible from your ip address.
Opencart itself tends to be pretty light weight vs some other shopping carts, but some extensions can add to the overhead. If you've made any changes recently, you may want to temporarily remove them to see if it helps.
It can be very hard to determine exactly where the problem is with this sketchy information. This sort of thing was why I moved from shared hosting to a virtual server/cloud hosting. In fact my shared hosting company estimated that I needed my own dedicated quad core machine to handle the load I was getting (at a price much higher than I could possibly afford). So I moved to a cloud server for a fraction of the price. Not only was it faster, but I was running on far less resources than my shared host was claiming I needed.
You'll want to examine your log files and see if you are getting any unusual amount of requests. Check your php files to make sure they haven't been hacked (adding additional load).
Of particular concern is your admin/index.php. If you aren't doing a lot of administration, it could indicate hacking attemps or exploits have been added to your code. It can be a good thing to lock down your admin directory using htaccess to only be accessible from your ip address.
Opencart itself tends to be pretty light weight vs some other shopping carts, but some extensions can add to the overhead. If you've made any changes recently, you may want to temporarily remove them to see if it helps.
It can be very hard to determine exactly where the problem is with this sketchy information. This sort of thing was why I moved from shared hosting to a virtual server/cloud hosting. In fact my shared hosting company estimated that I needed my own dedicated quad core machine to handle the load I was getting (at a price much higher than I could possibly afford). So I moved to a cloud server for a fraction of the price. Not only was it faster, but I was running on far less resources than my shared host was claiming I needed.
Who is online
Users browsing this forum: Google [Bot] and 71 guests