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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Current employer autocomplete crashes server
Pages: [1]

Author Topic: Current employer autocomplete crashes server  (Read 1515 times)

gensmann

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.14
  • MySQL version: 5.1.66
  • PHP version: 5.3.2
Current employer autocomplete crashes server
December 03, 2012, 06:12:04 am
Hi,

I'm experiencing a very frustrating problem and I hope someone has a suggestion how to fix it:

When a new contact is being created, upon entering data in the "Current Employer" field, the search for current employers. About 1500 contacts exist in the database but entering data in this field makes apache use up all the server ressources and a restart is required.

Does anyone have a suggestion as to why this is, where I can check if manual changes has been made to the code-base previously or any other suggestions how I can stop this from happening?

Thank you very much!

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Current employer autocomplete crashes server
December 03, 2012, 06:32:10 am
try changing your memory size and limit to 128MB on the server and see if that helps.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Current employer autocomplete crashes server
December 03, 2012, 06:34:37 am
If you aren't sure of where that is or how to change it, couple things:
  • Ask your hosting provider to change it, typically using a custom php.ini file placed in a specific spot or them editing it directly.
  • If you self host, just Google for how to edit php.ini to increase this.  Don't forget to restart apache to allow for changes to take affect.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Current employer autocomplete crashes server
December 03, 2012, 06:43:30 am
Where are you hosting this? Typically, CiviCRM will not work brilliantly on cheap hosting providers.

If you provide us with a bit more info on your host and your skill set, it will be easier to provide some useful answers :)
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

gensmann

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.14
  • MySQL version: 5.1.66
  • PHP version: 5.3.2
Re: Current employer autocomplete crashes server
December 03, 2012, 07:12:17 am
Hi guys, thanks.

It's a 2.2GHz, dual-core, 2 Gig ram virtual private server running LAMP (ubuntu), PHP memory_limit = 256M.

Upon this particular event, the number of apache-processes on the server increase 10 fold, the disk-IO goes nuts and the server needs to be restarted.

In the apache error log I get an [error] server reached MaxClients setting, consider raising the MaxClients setting
and lots of [warn] child process 7638 still did not exit, sending a SIGTERM. The maxclient setting is 150 and I wouldn't expect an autocomplete field to require that.

I'm comfortable with linux, but not sure where to identify a possible infinite-loop or similar in CiviCRM.

Cheers.



NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Current employer autocomplete crashes server
December 03, 2012, 07:58:20 am
What might be different about this event rather then others you have?  Custom profile used?
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

gensmann

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.14
  • MySQL version: 5.1.66
  • PHP version: 5.3.2
Re: Current employer autocomplete crashes server
December 03, 2012, 08:29:51 am
There are custom profiles associated with contacts, but before getting to these the basic info is entered - I've attached a screenshot. I'm unable to replicate the behavior in the demo system.

I recently upgraded to 4.2.6 from 4.1 but this didn't change the behavior. The code-base has not been changed, so could it be data-related? I can easily show all 2024 records in the civicrm_contact-table in phpMyAdmin.

I'm not sure how to start debugging, any other suggestions?

I can try to recreate the error tonight (outside production hours), any suggestions where to look for clues pointing to the cause?

Thanks.
« Last Edit: December 03, 2012, 01:35:08 pm by gensmann »

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Current employer autocomplete crashes server
December 03, 2012, 08:54:49 am
Does the log file for php give an yclues as to what procedure call is invoked right before it starts to crash?
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Current employer autocomplete crashes server
December 03, 2012, 09:37:49 am

during low / no load, can u enable the mysql query log and repeat the sequence in the browser

might give you a clue and see if we are basically making the same / similar queries in an infinite loop

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

gensmann

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.14
  • MySQL version: 5.1.66
  • PHP version: 5.3.2
Re: Current employer autocomplete crashes server
December 03, 2012, 01:25:09 pm
Thanks Lobo, I've tried your suggestion. It seems not to generate infinite loops, but I do get some entries in the Drupal log:

Notice: Undefined property: CRM_Core_DAO::$street_address in civicrm_api3_contact_getquick() (line 719 of /home/xxxx/sites/all/modules/civicrm/api/v3/Contact.php).
Notice: Undefined property: CRM_Core_DAO::$city in civicrm_api3_contact_getquick() (line 719 of /home/xxxx/sites/all/modules/civicrm/api/v3/Contact.php).
Notice: Undefined property: CRM_Core_DAO::$coy.name as country in civicrm_api3_contact_getquick() (line 719 of /home/xxxx/sites/all/modules/civicrm/api/v3/Contact.php).

Reprated ten times per letter entered in current employer. I assume these entries are related to the auto-complete of current employer, but not sure if they're related to the performance problems. I assume not, as the server didn't crash this time. I did apply 4.2.7 from svn in the meantime though.

Any further suggestions? Thank you.
« Last Edit: December 03, 2012, 01:27:29 pm by gensmann »

gensmann

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.14
  • MySQL version: 5.1.66
  • PHP version: 5.3.2
Re: Current employer autocomplete crashes server
December 03, 2012, 02:01:12 pm
Quote from: NASACT on December 03, 2012, 08:54:49 am
Does the log file for php give an yclues as to what procedure call is invoked right before it starts to crash?

Before this morning's crash apache's log says:

[Mon Dec 03 11:12:48 2012] [error] server reached MaxClients setting, consider raising the MaxClients setting
[Mon Dec 03 11:16:53 2012] [warn] child process 7862 still did not exit, sending a SIGTERM
(repeated about 250 times followed by)
[Mon Dec 03 11:16:59 2012] [error] child process 7862 still did not exit, sending a SIGKILL
(repeated 100 time before a hard reset was done).

I've enabled complete logging of php errors and will return if I encounter related php errors.


Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Current employer autocomplete crashes server
December 03, 2012, 04:31:26 pm

u can ignore those notices (for now). they are contributing to the increased load / server crashes

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

gensmann

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.14
  • MySQL version: 5.1.66
  • PHP version: 5.3.2
Re: Current employer autocomplete crashes server
December 04, 2012, 01:28:04 am
OK. It seems that all autocomplete fields have the same effect (server crash) but not consistently. Any suggestions? I could share the mysql log?
Thanks.

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Current employer autocomplete crashes server
December 05, 2012, 06:01:16 am
In case this helps, there are two main different ways of running apache in LAMP. prefork and worker. http://serverfault.com/questions/45042/which-to-install-apache-worker-or-prefork-what-are-the-dis-advantages-of-eac

In my experience on box somewhat similar to yours, pre-fork started to fall over when more than a few people start doing quick search at the same time.  It doesn't sound as extreme as yours but was similar. The reason being that every time you hit a button, it starts another process for that request.

Switching to worker solved the problem since all the requests use the same process (my technical lingo proces vs. thread vc. clients vs. children could probably do with a bit of work but the concept is reasonably sound I think.

Switching from apache to nginx with php-fpm is another reasonably straight forward and supported way of doing this.  We run a few sites on this set up on 12.04 that all work fine.

Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Slovak

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 3
    • My website
  • CiviCRM version: 3.4.x, 4.2.x
  • CMS version: Drupal 6.x, 7.x
  • MySQL version: 5.5.29
  • PHP version: 5.3.10
Re: Current employer autocomplete crashes server
March 02, 2013, 02:51:44 pm
Appears to be fixed in 4.3 per http://issues.civicrm.org/jira/browse/CRM-11808

Manually applying the changes in 4.2.8 got rid of the notices.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Current employer autocomplete crashes server

This forum was archived on 2017-11-26.