Jump to:

23375 Posts in 18175 Topics by 2866 members

General Questions

SilverStripe Forums » General Questions » Allowed memory size problem

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

Page: 1
Go to End
Author Topic: 1270 Views
  • nomen
    Avatar
    Community Member
    52 Posts

    Allowed memory size problem Link to this post

    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.

  • erhardsendk
    Avatar
    Community Member
    1 Post

    Re: Allowed memory size problem Link to this post

    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

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Allowed memory size problem Link to this post

    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.

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Allowed memory size problem Link to this post

    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

  • nomen
    Avatar
    Community Member
    52 Posts

    Re: Allowed memory size problem Link to this post

    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.

  • nomen
    Avatar
    Community Member
    52 Posts

    Re: Allowed memory size problem Link to this post

    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?

    1270 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.