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 error
Pages: [1]

Author Topic: Memory Allocation error  (Read 3783 times)

nimzie

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 1
Memory Allocation error
November 04, 2008, 09:08:06 am
I was able to go in to the installer and with a full "green lights ahead", I was able to install civicrm 2.0. I then went in to Drupal and turned on the module. I kept getting memory exhaust errors when the modules page was trying to refresh. As this happened, I upped the memory limits in my .htaccess file. Once I got that screen up with 80mb allocated, I tried to go to the CRM itself.
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 6144 bytes) in C:\xampp\htdocs\xampp\mtb\sites\all\modules\civicrm\packages\Mail\mime.php on line 131
was what greeted me.
I"ve upped to 100mb and even 120mb ... both locally and globally (php.ini)... Still no go. This is a pretty intense Drupal / vbDrupal install with a lot going on. It's not ridiculous though.

How should I get this memory situation straightened away. Is there a better approach than just throwing memory @ it?

Please advise .. I'm stuck!

Cheers,

Adam

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 error
November 04, 2008, 10:54:06 am

most likely you are not modifying the right php.ini file. php still thinks it only has 32MB of memory based on the message below. You might want to find the right php.ini file and check the xampp documentation

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

nimzie

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 1
Re: Memory Allocation error
November 04, 2008, 11:00:28 am
a file containing phpinfo(); in the root of this site reveals that I am changing the correct php.ini file.

nimzie

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 1
Re: Memory Allocation error
November 04, 2008, 03:09:02 pm
still experiencing the error though...

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 error
November 04, 2008, 03:18:22 pm
Quote from: nimzie on November 04, 2008, 09:08:06 am
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 6144 bytes) in C:\xampp\htdocs\xampp\mtb\sites\all\modules\civicrm\packages\Mail\mime.php on line 131

this error message seems to indicate otherwise (33554432 bytes == 32MB). You might want to investigate why this is happening. i suspect thats the root cause of your 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

winterlemming

  • Guest
Re: Memory Allocation error
December 10, 2008, 04:02:14 pm
I'm having this allocation problem as well.  I have reset the memory limits in my php.ini AND in civicrm.settings.php.  I even setup a script that checks in php memory limit and reports it back to me differently than my allocation error.  Whats up with this?  I've done a search of my entire public_html directory and can find no place where the memory is set to 50 MB as the error reports it to be.

1)  (http://www.mesaprogram.org/checkmem.php) -- Limit reports to be 500MB -- perhaps excessive, but extreme for illustration of point.
2) Whereas I receive an error from CiviCRM whenever I try to edit a contact, a contribution, etc that says

"Fatal error: Out of memory (allocated 51904512) (tried to allocate 30720 bytes) in ..../public_html/files/civicrm/templates_c/en_US/en_US/%%93/93A/93AD3FA7%%recentlyViewed.tpl.php on line 8"

These are quite incongruous.  Whats going wrong!!!!?

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 error
December 10, 2008, 08:58:30 pm

not sure what checkmem.php reports on. can you do a phpinfo( ); and see what that reports

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

thefluiddruid

  • Guest
Re: Memory Allocation error
December 12, 2008, 08:02:46 am
Hi,

I am having the same problem when I try to go to admin>modules I get:
Fatal error: Out of memory (allocated 32243712) (tried to allocate 128 bytes) in /*******/sites/all/modules/civicrm/CRM/Contribute/DAO/ContributionProduct.php on line 303

PHPINFO shows the 128M of memory I specified in my php.ini file , and I can't find the civicrm.settings.php file at all, even if I telnet in and do a whereis query.
I am using the latest stable version of CiviCrm, has the file name changed?

Thanks!
the Fluid Druid

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Memory Allocation error
December 12, 2008, 11:07:54 am
Filename for CiviCRM settings file has not changed. For default "automated" Drupal installs it should be in sites/default (same place as your Drupal settings.php file).
Protect your investment in CiviCRM by  becoming a Member!

thefluiddruid

  • Guest
Re: Memory Allocation error
December 12, 2008, 12:59:40 pm
Quote from: Dave Greenberg on December 12, 2008, 11:07:54 am
Filename for CiviCRM settings file has not changed. For default "automated" Drupal installs it should be in sites/default (same place as your Drupal settings.php file).

That is exactly where I looked.
Like I said I even telnetted into my account and ran a whereis query and turned up nothing.
I guess if it didn't get generated that might cause this problem...

the Fluid Druid

mdlueck

  • Ask me questions
  • ****
  • Posts: 382
  • Karma: 4
  • CiviCRM version: 4.7.24
  • CMS version: Drupal 6.x
  • MySQL version: 5.5.54
  • PHP version: 5.3.10
Re: Memory Allocation error
December 16, 2008, 05:01:46 pm
I have been doing a bit of searching on this topic, and my research has turned up the following that pertains to our PHP usage:

PHP is run as a CGI at our hosting provider. We select their PHP5 version for the entire site, and configure that via a .htaccess rule in the webroot.

PHP is configured via a php.ini, also in the webroot. That has worked well for Drupal installed in the webroot, and Gallery installed in a subdirectory.

Installing CiviCRM for the first time, I was told that the memory limit was set to 40. I do not happen to specify a number for the memory limit, but know when my php.ini settings are in affect, that 128 is the memory limit!

Turns out, there has to be a php.ini file in every directory that has a .php file in it, else the custom settings do not take affect!

I did test, and at our hosting provider it did work to create a symlink to the webroot copy. That at least makes changing it easier. Now to rig up a bash script to seek out .php files and make sure a link to php.ini is in the directory!
--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Memory Allocation error

This forum was archived on 2017-11-26.