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) »
  • PHP out of memory error using import members > update memberships
Pages: [1]

Author Topic: PHP out of memory error using import members > update memberships  (Read 1265 times)

circlebails

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 0
  • CiviCRM version: 4.1.X 4.2.X
  • CMS version: Drupal-6.X / Drupal-7.X
  • MySQL version: 5.1
  • PHP version: 5.2.16/17, 5.3
PHP out of memory error using import members > update memberships
July 04, 2011, 11:51:51 pm
Hi I saw this issue yesterday on one of our clients installations when trying to update 292 memberships via the > import members > update memberships function.

PHP memory limit was initially set at 256MB I upped this to 296MB but the problem persisted. I then went for a massive 512MB and the problem still persists.

This is currrently running CiviCRM-3.3.5!

mysql> select COUNT(*) from civicrm_membership;
+----------+
| COUNT(*) |
+----------+
|     8623 |

So updating 292 memberships consumes over 512MB of memory? It seems a remarkable amount.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: PHP out of memory error using import members > update memberships
July 05, 2011, 01:59:22 am
IMO import code is very old and there is room for lot of optimization. This might be the reason for memory errors. You might want to debug and potentially fix this code.

Thanks
Kurund
Found this reply helpful? Support CiviCRM

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: PHP out of memory error using import members > update memberships
July 05, 2011, 09:00:02 am

hey bails:

can u get davej to look at the mysql query log and see if the code is doing something super stupid (most likely) and/or getting stuck in some infinite loop

thanx

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

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: PHP out of memory error using import members > update memberships
July 05, 2011, 01:32:47 pm
IMHO this may be indicative of CiviCRM failing to handle a particular column of data during the import.    Either the format of a column is off, or a particular row of data contains characters the import cannot handle.  I would check your PHP error logs, and also see at what point the out of memory error chokes, normally some number of rows will update, check the row at or just before it fails.


For instance if at row 85 it fails, what is up with row 85 or 84?

Also I would attempt to import very few memberships - like 2.  Does it still fail?    Sometimes memberships must be updated in very small increments, less than 100 if you are importing a lot of data in the import, or the CSV is very large with extraneous columns.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

circlebails

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 0
  • CiviCRM version: 4.1.X 4.2.X
  • CMS version: Drupal-6.X / Drupal-7.X
  • MySQL version: 5.1
  • PHP version: 5.2.16/17, 5.3
Re: PHP out of memory error using import members > update memberships
July 05, 2011, 11:39:09 pm
Stoob.  I think you are incorrect. When the data is spread across 5 separate csv files and imported one by one, the import/update works correctly as expected.

Lobo. DaveJ will look at the logs and see if something silly is going on.

Thanks

Bails

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • PHP out of memory error using import members > update memberships

This forum was archived on 2017-11-26.