Page 1 of 1
memory problem
Posted: Fri Mar 24, 2006 1:50 am
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...
Re: memory problem
Posted: Fri Mar 24, 2006 1:01 pm
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
Posted: Fri Mar 24, 2006 2:51 pm
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

Posted: Fri Mar 24, 2006 4:15 pm
by garvinhicking
Hm, I think that just somewhere the backup plugin creates a too large query...the plugin would need some debugging then...
Posted: Fri Mar 24, 2006 7:22 pm
by SHRIKEE
but it did work for like 3 or 4 weeks
im wondering whats causing the trouble.....
Posted: Sun Mar 26, 2006 5:40 am
by SHRIKEE
i now also see the problem when i try to rebuild the thumbs, the resizing process doesnt work. Same error

Posted: Sun Mar 26, 2006 5:24 pm
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.