4

I create a Joomla website before 1 year, but before 1 month my Godaddy hosting said we have reached all resources and the CPU 100%, when I contact the support they said we have a PHP Script that start and not ended. how can I find this script?

  • If you list the 3rd party extensions, we might be able to point you in the right direction. Between the members of the group, we know which ones have worked without issue and can spot the outlier. – YellowWebMonkey Nov 11 '15 at 20:10
6

Option 1

During a similar situation to your own, I did some research and collected potential reasons for exceeding resource limitations on a shared hosting plan and you may find the following list useful in tracking down your issue.

Memory and CPU resource utilisation are often linked. For example, if memory resources are in short supply, memory might be paged to disk causing a CPU overhead. If CPU resources are in short supply, more memory might be requested to help alleviate the CPU issue. Some of the items in the following list might relate more to memory and some might relate more to CPU but are probably all worth checking if you are hitting a resource limitation.

Some of the potential reasons are easier to check for or test than others and it makes sense to check the easiest ones first. For example, you may end up having to do number 22 (temporarily disabling extensions one by one) but it probably makes sense to do some of the basic checks like nos. 1 to 9 first as these are relatively quick to do and may help narrow down the culprit fairly quickly.

  1. increase the PHP memory_limit by creating or editing the php.ini and adding memory_limit = 512M or change settings via cPanel -> "Select PHP Version" or similar
  2. check for any recent changes by looking at file and folder dates in components, plugins, modules, images/slideshow folders etc
  3. check for and apply updates to Joomla and third party extensions
  4. check the error logs in the /logs folder for anything unusual
  5. check the error log in cPanel (or similar)
  6. in phpMyAdmin (or similar), run "Repair" on the session table
  7. run Admin Tools "Fix Permissions" and "Repair and Optimise Tables" tools
  8. in cPanel (or similar), check for any CRON jobs that might be causing an excessive load
  9. in Awstats (or similar), check for excessive "Robots/Spiders visitors" visits - 20,000 hits / 500MB per month or thereabouts from Google and similar is probably reasonable - if necessary, you can use Admin Tools Pro firewall .htaccess security feature to detect and block spammers - reference: https://stackoverflow.com/a/17822758
  10. if the Joomla cache is enabled, temporarily increase the cache time to 45 minutes or so
  11. try temporarily switching to one of the default templates to see if the issue is with the template
  12. if GZip is enabled in Global Configuration, try temporarily switching it off and also try switching it on if it is currently disabled
  13. clear and purge the Joomla cache
  14. if using sh404SEF, purge sh404SEF urls
  15. purge unpublished urls in Components -> Redirect Manager
  16. try temporarily disabling SEF (SEF consumes CPU)
  17. try temporarily setting RewriteEngine Off in .htaccess (SEF consumes CPU)
  18. temporarily disable anti flood measures in sh404SEF, Kunena and similar extensions
  19. run a security audit to check for malware using myJoomla.com or similar
  20. run gtmetrix.com or similar report to see what, if anything, is taking a long time to load
  21. temporarily enable Joomla debug mode & check the amount of database queries? (Should ideally be under 30)
  22. temporarily disable third party modules/plug-ins one by one and check changes in database queries
  23. log a support request with your hosting provider asking about recent changes and if they can help determine the high resource process and narrow down the issue to a specific extension
  24. try asset table fix from Elin: http://github.com/elinw/AssetFix
  25. install CJSpeed (http://www.conquerjoomla.com/index.php?option=com_cjdownload&view=info&id=1&Itemid=116) or similar to see which extensions may be slowing down your website
  26. tweak MySQL: http://videos.cpanel.net/mysql-optimization

Option 2

Moving to a web hosting company with more generous resource limits might be a reasonable solution too.

How do I know if the issue is fixed?

Hosting providers often include tools in cPanel (or similar) so you can see the resource utilisation of your account. Checking these graphs will soon show you any change in memory or CPU utilisation etc.

1

I've never had a looping PHP script, thus never had to track it, however looking around and doing some research (hint), you could use a tool such as Xdebug. It will require a little patience and work. Also make sure you read the documentation so you know exactly what to do:

http://www.xdebug.org/docs/

It might be worth asking GoDaddy if they know which file is causing the loop before starting the above

  • can I find wich file? I think should be module or plugin – RayCoding Oct 29 '14 at 11:34
  • As Lodder said, GoDaddy could be of help and inform you about this script. Apart of that, I would clone the website on my computer and debug it from there. It really will allow to work more efficiently. – FFrewin Oct 29 '14 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.