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) »
  • Error when crm_create_contact is run
Pages: [1]

Author Topic: Error when crm_create_contact is run  (Read 2428 times)

mcarbone

  • Guest
Error when crm_create_contact is run
May 07, 2007, 11:42:55 am
I'm getting an odd database error when crm_create_contact is run via the API.  It is also happening when an anonymous user creates a contribution, when the system is trying to create their profile.  This started happening after I upgraded to the latest 1.7 release:


Code: [Select]
Sorry. A non-recoverable error has occurred.
Database Error Code: Lost connection to MySQL server during query, 2013
Return to CiviCRM menu.
Error Details:
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -14
    [message] => DB Error: no database selected
    [mode] => 16
    [debug_info] => SELECT *
 FROM civicrm_im
 
 
 
 
 
 [nativecode=2013 ** Lost connection to MySQL server during query]
    [type] => db_error
    [user_info] => SELECT *
 FROM civicrm_im
 
 
 
 
 
 [nativecode=2013 ** Lost connection to MySQL server during query]
    [to_string] => [db_error: message="DB Error: no database selected" code=-14 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT *
 FROM civicrm_im
 
 
 
 
 
 [nativecode=2013 ** Lost connection to MySQL server during query]"]
)

The backtrace has things breaking around here:

Code: [Select]
xxx/modules/civicrm/packages/DB/DataObject.php, debug_backtrace, 442
, find,
xxx/modules/civicrm/CRM/Core/BAO/Location.php, debug_backtrace, 235
xxx/modules/civicrm/CRM/Core/BAO/Location.php, islocationempty, 130

I dove in a little bit but was unable to figure out what is causing this.   Any thoughts?[/code]

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: Error when crm_create_contact is run
May 07, 2007, 12:17:15 pm

you might want to investigate the timeout variables in mysql and the mysql/php interface. If you do a yahoo! search on the "Lost connection" string you'll get a fair number of hints

I dont know much more about this to be more specific. so can u please update the thread once u've figured out and resolved the issue

Both the requests make a fair number of database calls and hence are timing out. i assume your mysql server is on another machine

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

mcarbone

  • Guest
Re: Error when crm_create_contact is run
May 07, 2007, 01:36:00 pm
Yes, that was it.  On the machine running the mysql server, I upped the 'wait_timeout'  variable in /etc/my.cnf from 10 to 100.  That did the trick.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Error when crm_create_contact is run

This forum was archived on 2017-11-26.