SOS - Fatal Error

Events happening in the community are now at Drupal community events on www.drupal.org.
jcl324's picture

Help anyone!

I was adding fields to a CCK content type and my site blew up. Here's the error:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 3946333 bytes) in E:\Xampp\htdocs \ufd5\includes\database.mysql.inc on line 400

I've searched and found it's a PHP memory size limit and easy to increase in PHP.ini and/or .htaccess? I've tried several things in 3 different places but no luck. Do you have to restart Apache any time you change these files? Is there something else I have to reset?

Dead in the water......

Comments

I'd boost the memory in settings.php

modulist's picture

The 32MB that your server has allocated isn't enough... 64MB is better, although some modules like imagecache and imageAPI require a lot more. 128MB is not out of the question.

Go to /sites/default/settings.php, and scroll down about 3/4 of the way down. You''ll see a slew of lines of code that start with ini_set. Be sure to add this line to that code:

ini_set('memory_limit',     '64M');

And no, you don't need to restart Apache to make your change take effect :-)

@modulist

Fixed sort of

jcl324's picture

Well that did something, I can sort of get into the site now but have pages of these errors now:

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', 'MySQL server has gone away\nquery: UNLOCK TABLES in E:\Xampp\htdocs\ufd5\includes\database.mysql.inc on line 172.', 2, '', 'http://sandon/ufd5/', '', '192.168.1.150', 1224254792) in E:\Xampp\htdocs\ufd5\includes\database.mysql.inc on line 172

I can see the admin menu, and content is buried below a big red box of SQL errors. Is the database now corrupted somehow? BTW, I did export the data in the mean time and successfully uploaded a new installation to a hosted site and that is all working now. Just need to get my local server working again.

JCL

JCL

If you haven't done so

ultimike's picture

If you haven't done so already, clear the cache and see what happens. You may want to try restarting MySql.

-mike

mysql server

jose.guevara's picture

JCL from the look of it, drupal could not connect to the database server. I got this error every one in a while. Read what it tried to put into the watchdog.

maybe you changed your settings.php for your live site, uploaded it, but didn't change it back for your dev server.

JG

Jose Guevara

Tampa Digital Studios
1600 E. 8th Ave., Suite A117
Tampa, FL 33605

512MB

ultimike's picture

I set the "memory_limit" in php.ini to 512M on my development machine (using MAMP). Not sure if you have to restart Apache afterward, but I always do.

-mike

Florida

Group organizers

Group categories

Florida Topics

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: