CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Joomla Extensions (Moderator: lcdweb) »
  • Heavy CPU usage
Pages: [1]

Author Topic: Heavy CPU usage  (Read 2597 times)

trevorwood

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 4
  • CiviCRM version: 4.0.2
  • CMS version: Joomla 1.6
  • MySQL version: 5.0.51a
  • PHP version: 5.2.6-1+lenny8
Heavy CPU usage
January 06, 2012, 12:02:55 am
Hi

Every now and then the website I'm developing virtually grinds to a halt. The support people had a look and this is what they send back to me


Hi Trevor,

I've been keeping an eye on your server this evening and the load suddenly went up and started causing resource issues.

I checked the processes and the web server was using nearly 100% CPU. So, I checked apache connections and interestingly there was only a few active connections so not a sudden rush or traffic.

I then attached a trace onto the process to find out exactly what was happening, and I found this:

getcwd("/var/www/vhosts/the-businessclub.org.uk/httpdocs", 4096) = 49
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/./CRM/Core/BAO/CustomField.php", 0x7fff6b5e41b0) = -1 ENOENT (No such file or directory)
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/BAO/CustomField.php", {st_mode=S_IFREG|0644, st_size=88952, ...}) = 0
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/BAO", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getcwd("/var/www/vhosts/the-businessclub.org.uk/httpdocs", 4096) = 49
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/./CRM/Core/Permission.php", 0x7fff6b5e4090) = -1 ENOENT (No such file or directory)
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Permission.php", {st_mode=S_IFREG|0644, st_size=20988, ...}) = 0
getcwd("/var/www/vhosts/the-businessclub.org.uk/httpdocs", 4096) = 49
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/./CRM/Core/Permission/Joomla.php", 0x7fff6b5e3d30) = -1 ENOENT (No such file or directory)
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Permission/Joomla.php", {st_mode=S_IFREG|0644, st_size=4636, ...}) = 0
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Permission", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getcwd("/var/www/vhosts/the-businessclub.org.uk/httpdocs", 4096) = 49
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/./CRM/Utils/String.php", 0x7fff6b5e3ab0) = -1 ENOENT (No such file or directory)
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Utils/String.php", {st_mode=S_IFREG|0644, st_size=17892, ...}) = 0
getcwd("/var/www/vhosts/the-businessclub.org.uk/httpdocs", 4096) = 49
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/./CRM/Utils/Array.php", 0x7fff6b5e4510) = -1 ENOENT (No such file or directory)
getcwd("/var/www/vhosts/the-businessclub.org.uk/httpdocs", 4096) = 49
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/./CRM/Contact/BAO/Query.php", 0x7fff6b5e4630) = -1 ENOENT (No such file or directory)
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO/Query.php", {st_mode=S_IFREG|0644, st_size=171501, ...}) = 0
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getcwd("/var/www/vhosts/the-businessclub.org.uk/httpdocs", 4096) = 49
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/./CRM/Contact/BAO/Contact.php", 0x7fff6b5e43f0) = -1 ENOENT (No such file or directory)
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO/Contact.php", {st_mode=S_IFREG|0644, st_size=119076, ...}) = 0
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getcwd("/var/www/vhosts/the-businessclub.org.uk/httpdocs", 4096) = 49
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/./CRM/Contact/BAO/Contact.php", 0x7fff6b5e43f0) = -1 ENOENT (No such file or directory)
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO/Contact.php", {st_mode=S_IFREG|0644, st_size=119076, ...}) = 0
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getcwd("/var/www/vhosts/the-businessclub.org.uk/httpdocs", 4096) = 49
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/./CRM/Core/Component.php", 0x7fff6b5e43f0) = -1 ENOENT (No such file or directory)
getcwd("/var/www/vhosts/the-businessclub.org.uk/httpdocs", 4096) = 49
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/./CRM/Event/BAO/Query.php", 0x7fff6b5e4090) = -1 ENOENT (No such file or directory)
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Event/BAO/Query.php", {st_mode=S_IFREG|0644, st_size=31539, ...}) = 0
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Event/BAO", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getcwd("/var/www/vhosts/the-businessclub.org.uk/httpdocs", 4096) = 49
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/./CRM/Event/DAO/Event.php", 0x7fff6b5e41b0) = -1 ENOENT (No such file or directory)
lstat("/var/www/vhosts/the-businessclub.org.uk/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Event/DAO/Event.php", {st_mode=S_IFREG|0644,


Notice all of the messages "No such file or Directory", these literally filled hundreds of lines within a second. So, it looks like this is where the problems stems, there's an error causing this.

Tale a look at the following article I found with the same issue on a drupal website:
http://drupal.org/node/1050740

There's coding errors on this website causing issues, it could be with an extension. If you are unaware what could be cuaisn g this it may be worth contacting the developers or try disable any extensions you don't necessary need to run the website.


could someone investigate please - it's making the site unusable. Thanks

trevorwood

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 4
  • CiviCRM version: 4.0.2
  • CMS version: Joomla 1.6
  • MySQL version: 5.0.51a
  • PHP version: 5.2.6-1+lenny8
Re: Heavy CPU usage
January 09, 2012, 02:52:24 am
Anyone?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Heavy CPU usage
January 09, 2012, 04:17:58 am
The file var/www/vhosts/the-businessclub.org.uk/httpdocs/./CRM/Core/BAO/CustomField.php should not exist actually. Can you check all of your settings and make sure all directories are correct? Something appears wrong.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

trevorwood

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 4
  • CiviCRM version: 4.0.2
  • CMS version: Joomla 1.6
  • MySQL version: 5.0.51a
  • PHP version: 5.2.6-1+lenny8
Re: Heavy CPU usage
January 09, 2012, 01:35:15 pm
Quote from: Hershel on January 09, 2012, 04:17:58 am
The file var/www/vhosts/the-businessclub.org.uk/httpdocs/./CRM/Core/BAO/CustomField.php should not exist actually. Can you check all of your settings and make sure all directories are correct? Something appears wrong.

something is wrong - but I don't know what. What settings are likely to cause this. Check all of your settings doesn't really help as there are many to check.

The ones that I've checked seem OK, but there again what do I know :)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Heavy CPU usage
January 09, 2012, 04:56:37 pm
Visit civicrm/admin/setting/updateConfigBackend&reset=1 and tell us what you see.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

trevorwood

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 4
  • CiviCRM version: 4.0.2
  • CMS version: Joomla 1.6
  • MySQL version: 5.0.51a
  • PHP version: 5.2.6-1+lenny8
Re: Heavy CPU usage
January 10, 2012, 01:20:51 am
base dir /var/www/vhosts/the-businessclub.org.uk/httpdocs/media/
base URL http://www.the-businessclub.org.uk/

which is different to my test server base dir
C:\websites\joomla\media\civicrm\templates_c\en_US\en_GB\

test server goes deeper into the media directory - odd because the test server is a recentish backup of the live server (I'll get abother backup copied over soon and see if it changes)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Heavy CPU usage
January 10, 2012, 02:31:47 am
Well using that URL it should change the setting from your test server, and it must change b/c it's a different directory. It's not clear what's going on here--do another transfer I guess, run that URL and then post the settings from both sites.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

trevorwood

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 4
  • CiviCRM version: 4.0.2
  • CMS version: Joomla 1.6
  • MySQL version: 5.0.51a
  • PHP version: 5.2.6-1+lenny8
Re: Heavy CPU usage
January 10, 2012, 03:20:30 am
it occured to me that the reason why the URLs have changed is because when I move the site to the test server I have to reinstall CiviCRM.

What should the correct settings be?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Heavy CPU usage
January 10, 2012, 06:10:06 am
If you run

Code: [Select]
UPDATE `civicrm_domain` SET `config_backend`=NULL ;
in MySQL after you transfer, CiviCRM should reset those itself.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

trevorwood

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 4
  • CiviCRM version: 4.0.2
  • CMS version: Joomla 1.6
  • MySQL version: 5.0.51a
  • PHP version: 5.2.6-1+lenny8
Re: Heavy CPU usage
January 12, 2012, 02:35:02 am
Thanks, I'll try that

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Joomla Extensions (Moderator: lcdweb) »
  • Heavy CPU usage

This forum was archived on 2017-11-26.