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 Import (Moderator: Yashodha Chaku) »
  • Importing Error
Pages: [1]

Author Topic: Importing Error  (Read 725 times)

robbrandt

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal
  • MySQL version: 5.1.41-3ubuntu12.9
  • PHP version: 5.3.6
Importing Error
January 17, 2014, 03:05:40 pm
We have a set of data that regularly needs to be imported into CiviCRM from another application.  We generate csv files to be imported using Kettle.

I find when the sets of import records is too large, I get errors like this one:

#0 /home/crm/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/crm/public_html/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /home/crm/public_html/sites/all/modules/civicrm/packages/DB.php(969): PEAR_Error->PEAR_Error("DB Error: no such table", -18, 16, (Array:2), "SELECT * FROM civicrm_import_job_3e6e9f85b1c6340c64b8f4fde887f816\n          ...")
#4 /home/crm/public_html/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-18, 16, (Array:2), "SELECT * FROM civicrm_import_job_3e6e9f85b1c6340c64b8f4fde887f816\n          ...")
#5 /home/crm/public_html/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -18, NULL, NULL, "SELECT * FROM civicrm_import_job_3e6e9f85b1c6340c64b8f4fde887f816\n          ...", "DB_Error", TRUE)
#6 /home/crm/public_html/sites/all/modules/civicrm/packages/DB/mysql.php(898): DB_common->raiseError(-18, NULL, NULL, NULL, "1146 ** Table 'civicrm.civicrm_import_job_3e6e9f85b1c6340c64b8f4fde887f816' d...")
#7 /home/crm/public_html/sites/all/modules/civicrm/packages/DB/mysql.php(327): DB_mysql->mysqlRaiseError()
#8 /home/crm/public_html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("SELECT * FROM civicrm_import_job_3e6e9f85b1c6340c64b8f4fde887f816\n          ...")
#9 /home/crm/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2421): DB_common->query("SELECT * FROM civicrm_import_job_3e6e9f85b1c6340c64b8f4fde887f816\n          ...")
#10 /home/crm/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(1613): DB_DataObject->_query("SELECT * FROM civicrm_import_job_3e6e9f85b1c6340c64b8f4fde887f816\n          ...")
#11 /home/crm/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(155): DB_DataObject->query("SELECT * FROM civicrm_import_job_3e6e9f85b1c6340c64b8f4fde887f816\n          ...")
#12 /home/crm/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(917): CRM_Core_DAO->query("SELECT * FROM civicrm_import_job_3e6e9f85b1c6340c64b8f4fde887f816\n          ...", TRUE)
#13 /home/crm/public_html/sites/all/modules/civicrm/CRM/Import/ImportJob.php(127): CRM_Core_DAO::executeQuery("SELECT * FROM civicrm_import_job_3e6e9f85b1c6340c64b8f4fde887f816\n          ...")
#14 /home/crm/public_html/sites/all/modules/civicrm/CRM/Import/Form/Preview.php(334): CRM_Import_ImportJob->isComplete(TRUE)
#15 /home/crm/public_html/sites/all/modules/civicrm/CRM/Core/Form.php(246): CRM_Import_Form_Preview->postProcess()
#16 /home/crm/public_html/sites/all/modules/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
#17 /home/crm/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(60): CRM_Core_StateMachine->perform(Object(CRM_Import_Form_Preview), "next", "Next")
#18 /home/crm/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Import_Form_Preview), "next")
#19 /home/crm/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Import_Form_Preview), "next")
#20 /home/crm/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(316): HTML_QuickForm_Page->handle("next")
#21 /home/crm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(292): CRM_Core_Controller->run((Array:3), NULL)
#22 /home/crm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(70): CRM_Core_Invoke::runItem((Array:13))
#23 /home/crm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#24 /home/crm/public_html/sites/all/modules/civicrm/drupal/civicrm.module(436): CRM_Core_Invoke::invoke((Array:3))
#25 [internal function](): civicrm_invoke("import", "contact")
#26 /home/crm/public_html/includes/menu.inc(517): call_user_func_array("civicrm_invoke", (Array:2))
#27 /home/crm/public_html/index.php(21): menu_execute_active_handler()
#28 {main}

What must I do to make these go away?  This was importing a set of 1000 individual contacts.  Importing 500 does not cause the error.  I haven't narrowed it down lower than that.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Importing Error
January 19, 2014, 10:41:49 am
Your main error appears to be

DB Error: no such table

Not sure why however. But if 500 works, is that not an option?
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.

robbrandt

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal
  • MySQL version: 5.1.41-3ubuntu12.9
  • PHP version: 5.3.6
Re: Importing Error
January 20, 2014, 12:44:36 pm
If it were a one time thing or if I were the one doing it, 15 batches of 500 records each would be OK.  But we want to turn this over to someone else to run whenever needed, and it shouldn't be something that needs to be baby-sat and have files fed in every 3 or 4 minutes.  We want to get this tuned so that each import (there are 3) can be done with one file each, and let the person do some other task while it's running.

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Importing Error
January 21, 2014, 09:29:03 am
Hi Rob,

If you're already using Kettle, you may want to use the CiviCRM plugins to feed directly into Civi from Kettle: https://civicrm.org/blogs/capo/new-tool-civicrm-data-integration

I had some trouble getting that to work - so instead I generate the import file, then use Kettle steps to SFTP the CSV to the server running Civi, then use another command to run the CLI import: https://civicrm.org/blogs/xavier/api_batch_tools

Let me know if you'd like some example Kettle files demonstrating the technique.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

robbrandt

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal
  • MySQL version: 5.1.41-3ubuntu12.9
  • PHP version: 5.3.6
Re: Importing Error
January 24, 2014, 01:42:01 pm
I've made a variety of changes and the hard crash with backtrace has disappeared.  I am unsure which of the changes was effective but happy to figure that out later.  Changes included increasing apache timeout and max connections settings.  Although I don't have all the imports in a single file, the batch sizes have doubled and that means progress.

But now I am getting some strange results.  I am unsure if something is really wrong, or if the user interface just isn't reporting correctly.

The javascript progress dialog is the issue.  For example, on a batch of 800 things will progress normally until it gets past 600, then, in sequence,

600 of 800

no processing status report yet

50 of 800

700 of 800

100 of 800

750 of 800

150 of 800

and then it completes.  The final total of records imported reflect the number of records remaining when the craziness above starts.  For the above, it would be something like

150 records imported

But there are no real errors.  Most of these records are "updates" with no changes, so it's hard to dig into the data and conclude that the records at the end of the batch have in fact been processed.

Any suggestions?


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Importing Error

This forum was archived on 2017-11-26.