Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Allowed memory size problem


Reply


6 Posts   1316 Views

Avatar
nomen

Community Member, 52 Posts

15 April 2009 at 4:45am

Hi all:

I have a production SS site from 1 year. This is SS 2.2.1
My hosting provides me 32MB of PHP. I can´t get more.
All works prefectly (we have not changes in the las 3-4 months).
Today, in administration, when i go to a user defined contact form i received:
"Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 53 bytes) in sapphire/core/model/DataObject.php on line 1501"

I read in forum and try to change all _config.php files with "ini_set('memory_limit', '48M');" with no sucess.
I also try to put in htaccess file "php_value memory_limit 48M" with no sucess.

Is any way to solve this problem? Why suddenly can´t load this contact form? Maybe because it has new contact and that exhausted memory?

Thank in advance and excuse me for my poor english.

Avatar
erhardsendk

Community Member, 1 Post

15 April 2009 at 5:06pm

Hi,

I've experienced this my self, and the culprit was the setting register_globals - maybe your script relies on this setting to be 'on' - and the hosting provider has changed their environment, thus disabling register_globals.

Can you check with phpinfo() ?

/Lars

Avatar
banal

Community Member, 901 Posts

15 April 2009 at 8:24pm

I don't think this has anything to do with register_globals. Do NOT set register_globals to 'on'.
You're having some bad luck with that memory.. only 53 bytes are missing. Maybe it works if you try it again? Or does it always fail?

I think your best bet is to ask your hosting provider to increase the memory for you. Or switch to another hosting provider.

Avatar
Willr

Forum Moderator, 5513 Posts

15 April 2009 at 10:01pm

If you have uploaded more files / images, created more pages this all increases the memory required. Only fix is to increase the memory on the server or clean up the database / remove pages

Avatar
nomen

Community Member, 52 Posts

16 April 2009 at 12:56am

Hi all:

Thank you very much to all for answering me.

My client´s hosting is reluctant to make changes (no more RAM, no changes allowed in htaccess) and my client says he don´t want to change the hosting. So I have a problem with this.

The error always appears in this page, but not in other pages. This is a very simple contact form with 9 fields. I don´t think there are too much contacts filling this form.
Willr, I don´t understand well why the images/files increases the memory required to open a simple page, with no files/images inside, and why creating new pages increases memory requirement.
Anyway I will try to clean sitetree_versions and PageView which are very big and retry to open this page.

Avatar
nomen

Community Member, 52 Posts

16 April 2009 at 2:20am

Edited: 16/04/2009 2:22am

Hi all:

I have make some cleaning in the database.

I have cleaned SiteTree_versions using:

DELETE FROM SiteTree_versions WHERE CONCAT_WS( '_', RecordID, Version ) NOT IN (
SELECT CONCAT_WS( '_', id, Version ) AS combined_id
FROM SiteTree
)


and then

OPTIMIZE TABLE `SiteTree_versions`

And I have cleaned PageView table with:

DELETE FROM `PageView` WHERE ID < 450000


and then

OPTIMIZE TABLE ` PageView `

But no sucess, I still can´t open the form page in the admin.
Somebody has a new idea?