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) »
  • Lots of Import problems
Pages: [1]

Author Topic: Lots of Import problems  (Read 3264 times)

wexzone

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
Lots of Import problems
January 06, 2011, 10:03:25 am
I have been having a lot of problems with the import feature lately. I am running 3.3.0 with Drupal 6.

I am practicing on a few records before moving my entire contacts (20K+ records)

First off, if I do beyond 150 records at once, I get a Bad Response From Server, which I assume is my browser timing out.  Any tips for remedy to this?

Secondly, I am getting a lot of import record errors, that are really not errors, like saying problem with urls (the urls are fine) and such.  Can I turn off record checking?

Third, when the I go through to Step 4, it asks me to download index.php and import freezes at 0% completed, nothing happens.

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Lots of Import problems
January 06, 2011, 03:41:22 pm
In general, upgrade to 3.3.2.  There have been over 50 bugs fixed in version 3.3 since 3.3.0.  Also, I try to import less than 2000 records in a single batch for best results (this is my personal opinion).

Your errors sound like PHP configuration problems.

You can generally do this in .htaccess or php.ini

1. Set your PHP script execution time to a least 240 seconds
2. Set your PHP memory to 128MB

If your host will not let you alter these settings, find a new host.


Regarding URLs.  CiviCRM requires all urls be fully formed including a http:// or https:// at the front.  No exceptions.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

wexzone

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
Re: Lots of Import problems
January 06, 2011, 08:57:38 pm
I can't get even 50 records to run through, much less 2000! :)

My php settings:
execution time: 250 seconds
memory: 256 M

I will try upgrading to 3.3.2

wexzone

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
Re: Lots of Import problems
January 06, 2011, 09:09:44 pm
Upgraded to 3.3.2.  Upgrade went well, very easy.

Immediately, went in and tried to import 50 records.  Got 7 record errors, no big deal.  At Step 4:
Tries to download index.php, status sits at 0% Complete, nothing happens.

There must be an error somewhere.  I guess I need to check my CSV, line by line, field by field.

It would be nice to have some error handling here....

wexzone

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
Re: Lots of Import problems
January 06, 2011, 10:11:23 pm
Ok, so I reduced the size of my CSV, look for any weird characters, and tried importing again.

Same thing, asks me if I want to download index.php at Step 4, nothing else happens.

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Lots of Import problems
January 06, 2011, 10:58:58 pm
you might want to jump on our public demo site and test import here : http://drupal.demo.civicrm.org/

with some small set of data file. ( any personal / private information should be disguise  )

it will help us to track down the problem.

thanks

kiran
You Are Designed To Choose... Defined By Choice.

alanms

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
Re: Lots of Import problems
January 07, 2011, 03:44:49 am
I've seen that issue of it trying to download index.php a few times on the forums before, not just with imports. This might be relevant too if you haven't already seen it - http://forum.civicrm.org/index.php/topic,17228.0.html - no clear answers though.

With the other import issues, imports are a bit of a nightmare. A lot of people have ended up coding their own task-specific import alternatives using the APIs. I think some of these are shared and might be suitable - have a search on the forums.

When I use the import script, my most common cause of bogus errors is when there are trailing or preceding spaces in a cell. There are some other weird issues with lists of allowed values having funny suprises in them - particularly countries, where some of the allowed/disallowed countries are just strange. Also there are sometimes some issues with csv cells being read incorrectly by PHP if they aren't encased in quotes. I made an Excel macro that avoids this last issue which might help if nothing else works: http://forum.civicrm.org/index.php/topic,16442.msg70182.html#msg70182

The other essential import tip is, imports usually fall over and die if you try to import 'reference' data such as like relationships (e.g. current employer) at the same time as anything else. To get around this limitation I usually do imports in a multi step process like this:

1) Import basic data (names, addresses, emails, notes...)
2) Export these contacts' CiviCRM contact IDs and basic data to identify them (names, email addresses)
3) Line these IDs up with the original records
4) Import relationships one at a time with a 2 column sheet containing nothing but the two contact IDs (e.g. 'employee ID | employer ID')
5) Import activities as a seperate sheet using one column of contact IDs and various columns of activity data
6) Etc...

It's fiddly and frustrating but it works and avoids the numerous possible internal server failures that are otherwise possible. Imports are definitely something of a weak link.

Unless you've got a crazy beast of a high-powered server, if you are going to do a lot of imports, you generally need to configure PHP and MYSQL to cater for the import script, which generally means whacking up every buffer or memory limit to between 2 and 20 times the typical value. Have a search for this - I think some people have posted some examples of the settings that work for them.
« Last Edit: January 07, 2011, 03:50:51 am by alanms »

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Lots of Import problems
January 07, 2011, 09:32:50 am
There is a serious error afoot here.

You should:

1. Take a look at your PHP server error log immediately after the problem
2. Do as Kiran suggested and attempt to replicate the problem on the Demo site of CiviCRM, then we can isolate the problem to your local installation.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

wexzone

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
Re: Lots of Import problems
January 15, 2011, 01:17:31 pm
Ok, I got things working after tweaking somethings, and found a custom field hat was causing the issue.

So, now it works fine with test data, but if I try and import like 900 records, I get Bad Server Response, sometimes at Step 2, sometimes at Step 3, and sometimes during the actual import at step 4.

I've increase all memory and timeout settings o both php and mysql to try and get it to work, but nothing helps.  It was working with 1,000 at a time, but now it doesn't.

Kampaweb

  • I’m new here
  • *
  • Posts: 16
  • Karma: 1
    • Campaignforum
  • CiviCRM version: 3.3.6
  • CMS version: Drupal 6.20
  • MySQL version: 5.1.54
  • PHP version: 5.3
Re: Lots of Import problems
February 14, 2011, 03:56:31 am
I agree, that imports are "a bit of a nightmare" and am a bit surprised as the import-function seems to be rather essential...

Anyway, I, too, had the problem that import wouldn't start but present me with a download window (sometimes it offered me "index.php", sometimes "contact.php") instead...

After a lot of frustrating searching and tweaking of server settings I managed to boil it down to a rather simple reason:

The table I wanted to import contained a column with an external ID, which was longer than 32 characters.
The import-script obviously cut everything after these 32 characters. As the number varied only in the last 4 characters, this would generate two (actually hundreds, but two is enough) of identical IDs instead of unique IDs...

I assume (!) this goes for all values that are supposed to be unique. So it might help to look there if you run into similar troubles.

Funny, this should provoke the import to crash rather than a simple error message (I think this should be fixed asap).

HTH

Chris
We passionately provide NPOs in Switzerland, Germany and Austria with the means to campaign succesfully.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Lots of Import problems
February 14, 2011, 04:14:38 am
Well spotted.

Do you have the IT knowledge to modify the code and add a check that external iD isn't >32 ?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Kampaweb

  • I’m new here
  • *
  • Posts: 16
  • Karma: 1
    • Campaignforum
  • CiviCRM version: 3.3.6
  • CMS version: Drupal 6.20
  • MySQL version: 5.1.54
  • PHP version: 5.3
Re: Lots of Import problems
February 14, 2011, 07:17:55 am
Quote from: xavier on February 14, 2011, 04:14:38 am
Well spotted.

Frankly, this took quite some time and swearing. ;-)
That's why I wanted to prevent others from going through the same.

Quote from: xavier on February 14, 2011, 04:14:38 am
Do you have the IT knowledge to modify the code and add a check that external iD isn't >32 ?

X+

Unfortunately, I don't, otherwise I'd have proposed a fix immediately. :-(
But I wanted to let the community know, and hopefully provide a little help, anyway.

Best wishes,

Chris

We passionately provide NPOs in Switzerland, Germany and Austria with the means to campaign succesfully.

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

This forum was archived on 2017-11-26.