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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Memory allocation errors in PEAR.php
Pages: [1]

Author Topic: Memory allocation errors in PEAR.php  (Read 5308 times)

robertjd

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
Memory allocation errors in PEAR.php
October 19, 2009, 03:23:58 pm
I've seen various posts here about this error, but no explanation as to what the problem is:

Code: [Select]
Fatal error: Allowed memory size of 1468006400 bytes exhausted (tried to allocate 40 bytes) in /Users/robert/Sites/jb/sites/all/modules/civicrm/packages/PEAR.php on line 872
As you can see, I went as far as letting PHP have 1.5GB of memory and this is still eating it all up.  What??

This is happening when trying to move a CiviCRM / Drupal install.  First attempt was to a bluehost.com hosting account.  There, giving php 512mb of memory allowed PEAR to do whatever it is doing and I was fine after that.  But of course I'm not going to allow php to have that much memory all the time, I'm setting it back to 64mb.

Is this problem going to happen again?

Second attempt at moving the site is to a mac powerbook, where as you can see not even 1.5GB of memory is enough to satisfy this script.

Could someone please provide some insight?

Thanks,
Robert

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Memory allocation errors in PEAR.php
October 19, 2009, 04:22:53 pm
Hmm - I'm running CiviCRM (multiple versions including 3.0.1) and Drupal 6 on my mac powerbook with this setting for PHP memory limit - and it runs great:

memory_limit => 128M

Seems like something's not quite right with your configuration / installation. I recall a recent post where a bad config setting caused this but can't find the post right now :-(
Protect your investment in CiviCRM by  becoming a Member!

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: Memory allocation errors in PEAR.php
October 19, 2009, 08:19:31 pm

most likely your CIVICRM_DSN is incorrect. please check it again and fix :)

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

robertjd

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
Re: Memory allocation errors in PEAR.php
October 20, 2009, 05:14:22 am
I'm not familiar with CIVICRM_DSN.  The only place where I see this defined is in templates/CRM/common/civicrm.settings.php.tpl:

Quote
define( 'CIVICRM_DSN', 'mysql://%%dbUser%%:%%dbPass%%@%%dbHost%%/%%dbName%%?new_link=true' );

Is this not correct?

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: Memory allocation errors in PEAR.php
October 20, 2009, 10:10:46 am

check the DSN settings in: sites/default/civicrm.settings.php

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

robertjd

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
Re: Memory allocation errors in PEAR.php
October 20, 2009, 11:45:14 am
CIVICRM_DSN is set as it should be in civicrm.settings.php:

define( 'CIVICRM_DSN', 'mysql://civi:civi@localhost/civicrm?new_link=true' );

Why am I hunting down a pear memory issue by looking at my database connector?

Thanks

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: Memory allocation errors in PEAR.php
October 20, 2009, 12:10:31 pm

the "infinite eating of as much memory as you give it" is a PEAR DB DSN issue, hence we asked you to check it

if you have access to the mysql query log, can u check there and see what the log says

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

robertjd

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
Re: Memory allocation errors in PEAR.php
October 21, 2009, 07:59:08 am
Well in fact it was a DB problem - permission denied!  I found this after looking into what was going in in that pear error reporting function (which is not nice enough to actually print your errors, it would seem).

Is this a problem that is specific to pear, or is it a problem that is caused be the way CiviCRM is using pear?

Thanks for the help.

flacorps

  • Guest
Re: Memory allocation errors in PEAR.php
October 30, 2009, 09:16:02 am
Please forgive a newbie question.

Did the knowledge that the permission was denied allow the OP to fix the error, and if so, how?

I can get around a bit with PHP, cPanel, etc. but I'm having exactly this problem and haven't quite solved it yet.

mine reads:
define( 'CIVICRM_DSN'          , 'mysql://flacorps05:<password redacted>@localhost/flacorps_drp05?new_link=true' );

I found a couple of other issues that could have been it and I made sure those were fixed, and still no luck.
« Last Edit: October 30, 2009, 09:28:46 am by flacorps »

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: Memory allocation errors in PEAR.php
October 30, 2009, 09:41:21 am

please upgrade to 3.0.2

the above memory issue is fixed in that version. It was a bad interaction between civicrm error reporting and PEAR error reporting which caused a memory issue

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

flacorps

  • Guest
Re: Memory allocation errors in PEAR.php
November 02, 2009, 05:28:42 pm
OK, thanks ... did the upgrade and now I get this:

Quote
DB_DataObject Error: DB Error: connect failed
.

Help a noob out here .... please?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Memory allocation errors in PEAR.php

This forum was archived on 2017-11-26.