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 »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Fatal error: Allowed memory size
Pages: [1]

Author Topic: Fatal error: Allowed memory size  (Read 9709 times)

scifiguy

  • Guest
Fatal error: Allowed memory size
May 25, 2007, 01:28:45 pm
I just installed CiviCRM on Drupal and get this error:

Fatal error: Allowed memory size of 25165824 bytes exhausted (tried to allocate 14580 bytes) in C:\wamp\www\drupal-5.1\modules\civicrm\packages\Smarty\Smarty_Compiler.class.php on line 1250

I increased the memory limit in php.ini to 30M.

Any ideas on what might cause this?

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Fatal error: Allowed memory size
May 27, 2007, 09:45:49 pm
The error says that the memory limit is 24M, so if it reappears after you’ve increased the limit to 30M then PHP is not picking up the change. If you’re sure you’ve upped the limit in the right place (say, by checking phpinfo()), you can try changing the last lines of your civicrm.settings.php – they are there to make sure the limit is at least 24M, but should not fire up if the limit is higher.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

bubbasheeko

  • Guest
Re: Fatal error: Allowed memory size
June 20, 2007, 08:34:18 am
Importing contacts as well!  116 contacts.

Unfortunately I have to dispute the previous response by Piotr.  I have devoted 48MB, so this situation would not involve the if statement checking for at least 24 MB.  It is happening when more than 24MB of memory is available.

Fatal error: Allowed memory size of 50331648 bytes exhausted (tried  to allocate 1505281 bytes) in  /home/leedsgre/public_html/themes/LiberalRed/page.tpl.php on line 47

i received this error message originally when I was using the default in php.ini.  It was set to 32MB.  I bumped it up to 50MB through .htaccess as I am on a shared host, and received the error above.

I finally bumped it to 90MB and have not had an issue since.  I can't believe that 90MB for PHP is acceptable.  Something has to looping here that is causing it to run up so high.

I am using the newest version of Civicrm, downloaded from Soundforge last night - civicrm-1.7.9821-drupal-php5.tar

I was asked to bring down the memory usage by my host.  So I brought it down to 42MB - which is should still be more than enough to run civicrm.  I am noticing this is occuring with more than just the Import feature.  I attempted to send a group email from the site and received this after selecting the html file to send (after clicking on next):

Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 256 bytes) in /home/leedsgre/public_html/modules/civicrm/packages/DB/mysql.php on line 380

I brought the php memory allocation down to 32 MB which is recommended in the documentation.  I am not able to open the CiviContribute, CiviMail, CiviEvent or CiviMember apps.  I receive the fatal error again, but specifying that it was not able to write to memory past 33,428,000 bytes(or something close to that)

Could someone look into this?  There appears to be a huge issue here.
« Last Edit: June 20, 2007, 11:44:32 am by bubbasheeko »

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: Fatal error: Allowed memory size
June 20, 2007, 05:05:10 pm

How many other drupal modules do you have enabled and active? To some extent your memory size is a function of the number of modules you have enabled. I think the requirement of 32 MB is reasonable with a few modules enabled. If you have quite a few modules enabled, it might need to be raised etc (depending on the modules).

Note that CiviCRM avoids loading any information if its not part of the page :)

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

bubbasheeko

  • Guest
Re: Fatal error: Allowed memory size
June 20, 2007, 06:06:17 pm
No optional modules enabled, just core and civicrm-1.7.9821-drupal-php5.  42MB for PHP.
Attempted to import a 116 record csv.  Failed:

Fatal error: Allowed memory size of 44040192 bytes exhausted (tried to allocate 1496251 bytes) in /home/leedsgre/public_html/themes/engines/phptemplate/phptemplate.engine on line 116

Cut up the file to import - only 10 records:

Fatal error: Allowed memory size of 44040192 bytes exhausted (tried to allocate 1505281 bytes) in /home/leedsgre/public_html/themes/LiberalRed/page.tpl.php on line 47

I even tried one record, with the same results.

I even eliminated my theme from causing the issue, I switched to Garland - Fluid Width - same issue.

As Lobo asked, I attempted to upload on the demo server - it came up and waited for me to match up the fields - so that worked.

I tried exporting the default record of the admin account and then importing that csv created by civicrm:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 11556 bytes) in /home/leedsgre/public_html/modules/civicrm/packages/HTML/QuickForm/hierselect.php on line 329

So how can a file created by civicrm fail on import with only one record with very basic information contained in that file?

I checked devel memory report.  At initialization - 7.9MB.  When I attempt to import contacts: 32MB.

What is causing this memory leak???

I am not sure what else to look at here, a little stumped.
« Last Edit: June 20, 2007, 09:10:05 pm by bubbasheeko »

bubbasheeko

  • Guest
Re: Fatal error: Allowed memory size
June 20, 2007, 08:02:36 pm
Okay, I attempted to do a test mail with civimail.  The drupal admin account is the only contact in civicrm.  I tried to send a test email:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 128 bytes) in /home/leedsgre/public_html/modules/civicrm/CRM/Core/DAO/Address.php on line 352

So it is definitely happening with more than just import contacts.

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: Fatal error: Allowed memory size
June 21, 2007, 08:28:05 am

Not sure what the below is happening and how. We'll do a few more memory tests for 1.8 and have a better idea how much memory we consume in a default config. We typically run configs from 24M - 48M in development. I just reset my limit to 24M and it seems to work fine. Just tested with a simple import of 1000 records and things worked fine

not sure why u r having such major issues. i suspect we would have heard from more folks if the problem was as severe as you reported

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

gadzuk

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
Re: Fatal error: Allowed memory size
August 12, 2007, 08:08:00 am
I'm having the same problem, can't get past it. 

We stopped using CiviCRM in June and went back to our old system.  I downloaded the latest CiviCRM-stable yesterday, problem still there when I try to import.

Code: [Select]
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 811014 bytes) in /home/quadsqua/public_html/themes/engines/phptemplate/phptemplate.engine on line 187
PHP: 5.2.1
Drupal: 4.7.7
MySQL: 4.1.21-standard-log
Apache: 1.3.37 (Unix)
Linux Kernel:  2.6.9-55.0.2.ELsmp
CiviCRM: 1.7.10272 (happened with previous versions too)
Host service:  Site5

I'll give 1.8 a try.

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: Fatal error: Allowed memory size
August 12, 2007, 11:19:36 am

Will help if you give a few more details and or reproduce the problem in demo. Periodicaly testing new versions of civicrm to check if your specific issue has been resolved is probably not the most efficient use of time (IMO)

It would be great if you could reproduce the bug on http://demo.civicrm.org/drupal/. If so, please file an issue. If not, can u give us some characteristics of your import file (how many columns and the type of columns, how many rows etc). Finally consider upping you PHP memory to 64M

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

bubbasheeko

  • Guest
Re: Fatal error: Allowed memory size
August 21, 2007, 10:12:00 am
Lobo,  could you provide more details of how your demo server is set up?

Is a shared or dedicated host?  What is the php_memory_limit?  What modules are running in Drupal?  What modules are running for CiviCRM?  What is the server type (ie. apache)?  What is modules are running on the web server? 

I would like to duplicate to the issue on my own server and start throwing things into the mix.  But if your demo server is not set up the same, it is pretty much pointless to try anything further if the environments are not the same.

I find that the more things added to CiviCRM the more it pushes the feasibility line of running on shared hosts.  Shared hosts can get quite finicky about taking up a large amount of memory for your site.  Might I suggest that as new things are added, that a quick study should be taken up about what is no longer needed / outdated?  Once that is decided remove what is not needed, or maybe a 'lite' version of CiviCRM could be created.

I hope this doesn't sound like a complaint, by all means the opposite.  CiviCRM is a great creation and a very useful application, but until shared hosts start bumping up their memory limits, a majority of us are going to start experiencing this issue more and more as new things are added to this ingenius application.

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: Fatal error: Allowed memory size
August 21, 2007, 11:18:23 am

Its a dedicated host with 32M in php memory_limit running apache 2.x  and php 5.1.x. The demo server has just the core drupal modules and the calendar module enabled.

You can get reasonably priced good hosting from sites like CivicSpace on demand or Open Social Sites etc. I suspect these orgs give you more flexibility and memory for a reasonable price

If you think a 'lite' version is needed, would be great for you to step up and help create it :). We'd be glad to help u get going

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

emerygjr

  • Guest
Re: Fatal error: Allowed memory size
March 10, 2008, 07:58:48 am
I had the same problem. The resolution was to put the correct php.ini into the base folder containing the Drupal structure. The phpinfo.php was showing 64m but internally Drupal was showing 8m until I placed a copy of php.ini into the Drupal folder with the memory set to 64m. Now it all runs correctly.

This seems to be the case in a shared environment. The php.ini at the account root does not flow to all folders on the site.

Emery Gordon

preacherboy86

  • I’m new here
  • *
  • Posts: 24
  • Karma: 1
Re: Fatal error: Allowed memory size
March 19, 2008, 11:34:49 am
I had a similar problem when I was using Bluehost as my server. PHP memory errors stink, and no matter how many times I asked bluehost to up the memory size- the problem would return. So I moved my site over to Site5, and have never had that problem again.

Also, Site5 has all the modules necessary for CiviMail while Bluehost doesn't. That was another plus.

In conclusion, the only way I got rid of that nasty error was moving servers. It stinks, but it worked for me.

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: Fatal error: Allowed memory size
March 20, 2008, 10:49:19 am
Just curious - why the large memory requirement for the install?  We copy files up, run scripts to establish the databases.... 

ParkHill

  • Guest
Re: Fatal error: Allowed memory size
March 20, 2008, 04:37:55 pm
PreacherBoy.

I'm at Bluehost (and happy). I can testify that emerygjr's solution worked for me. On my initial installation confirmation/check for CiviCRM 2.0.1, I was notified that my php memory limit of 32M might be inadequate, although I was permitted to go ahead and install CiviCRM. I got the Allowed Memory Size Exhasted error as soon as I did my first CiviCRM function (search).

This was immediately fixed by following emerybjr's suggestion:

"The resolution was to put the correct php.ini into the base folder containing the Drupal structure."

I lost some time trying to figure out which directory to put the php.ini file in.



Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Fatal error: Allowed memory size

This forum was archived on 2017-11-26.