memory problem

Found a bug? Tell us!!
Post Reply
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

memory problem

Post by SHRIKEE »

what do i do with this error?

When i do a manual database backup
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 71 bytes) in /var/www/html/include/db/mysql.inc.php on line 120
I've seen this error before thats why ive set the memory size to 16mb...
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: memory problem

Post by garvinhicking »

The problem seems to be that one of your database table is larger than 16MB, and thus the backup plugin cannot parse it into a variable.

The solution is to either deactive the memory limit for PHP or set it to the highest value of one of your tables.

Actually this is one of the reasons why making backups with PHP tools is problematic...on top of that, I haven'T written the backup plugin so I must admit I don't know if it pays attention to not store variables outside of the loops they are required in, and is paying a close eye on memory usage...

The other place where you may have raised the memory limit was with Spartacus plugins? When you have a lot of them, they can also use up memory easily...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

i just checked phpmyadmin

the largest table is 615kb (the visitor logger)
and teh total dbsize is 975kb

so i think the problem is somewhere else. perhaps in my php.ini but i have no clue what the problem is also i cant find anything usefull on php.net or google :(
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hm, I think that just somewhere the backup plugin creates a too large query...the plugin would need some debugging then...
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

but it did work for like 3 or 4 weeks :(

im wondering whats causing the trouble.....
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

i now also see the problem when i try to rebuild the thumbs, the resizing process doesnt work. Same error :(
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

I've spend some time on the internet looking for an answer again.

I found out this is NOT a serendipity problem. More likely a PHP issue.
From what i've found alot of people are having such errors on as many different scripts. Most organisations, developers just increase their memory size when they encounter the error.

I found several sites where people stated that php has poor memory management and that this can be solved by programs managing the cache and memory uasge of the system. I guess they mean zend optimiser and such.
Im not aware of such program being installed on my servers. Im using a default install of Fedora Core 4 amd64.

Also another popular "sollution" is just to increase the memory size in php.ini. I now have set it to 32MB which is insane in my idea, but it works... For now.
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
Post Reply