Fatal error: Allowed memory size of 33554432 bytes exhausted

Community Forums Forums General Discussion Fatal error: Allowed memory size of 33554432 bytes exhausted

This topic is: not resolved

This topic contains 12 replies, has 5 voices, and was last updated by  gregpayette 1 year ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #66433

    gregpayette
    Participant
    Post count: 26

    I’m using a host that’s not mine (a reseller friend of my client) and after having some image loading issues, now seeing this message on my WP dashboard:

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 30720 bytes) in public_html/wp-includes/SimplePie/Locator.php on line 192

    Brad Dalton replied to someone else having a similar issue that “you might need to increase your memory limits and upload limits in your php.ini file on your server.”

    So I’m looking to have the host make that fix, hoping it works.

    But is the issue of using up too much memory caused by having too many images? Should they be stored elsewhere other than the wordpress media folder? (I’ve heard it’s better to store images in the theme’s content/images folder instead…but not sure why.)

    Any feedback would be appreciated. Thank you.

    greg

    #66456

    RobG
    Participant
    Post count: 1053

    Well I’ve never encountered anything like this and I have tons on images, it sounds like a hosting problem and they should correct this for you. Most of my images are stored in my Media Library and all seems ok.


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    • This reply was modified 1 year ago by  RobG.
    • This reply was modified 1 year ago by  RobG.
    #66468

    dev
    Participant
    Post count: 457

    I have seen this on one server at Pair Networks a couple of months ago. I’m going to post the answer that I got but I don’t think most people will find it of much value. Bottom line, the host will have to fix it for you. With Pair, they run PHP via CGI and not as a module and that gives some flexibility allowing you to use your own php.ini file. Anyway, below is what they sent me… it might apply to your host as well… but like I say, contact them and have them fix it for you. No doubt they have seen this before.

    Dev
    NewMedia Website Design

    For your client’s hosting account, this is using the new shared hosting
    setup. That is different from legacy shared hosting
    accounts. One of the key differences is the way that
    PHP is handled on those.

    Previously PHP was run inside the Apache httpd child
    processes in module form. While that works well for dedicated setups, it
    can be problematic in shared environments as the server is then potentially
    running Web code under the same “nobody” user for all users on the server.
    That can be secured against using scripts like php-CGIwrap to run under
    your username, but many users were looking for script execution under their
    regular username by default and didn’t want the separation to the “nobody”
    user.

    In order to accommodate that, the module form of PHP was removed from the
    Apache child processes, and mod_fcgid set up in its place. A FastCGI /
    fcgid aware copy of PHP was then provided, so that is called through the
    mod_fcgid gateway from Apache for each account. With that running via
    FastCGI, suEXEC can be natively run on it to avoid any overhead from
    php-CGIwrap. The FastCGI setup allows the PHP processes to persist between
    connections, which removes the overhead of spawning new PHP CGI processes
    between requests. That spawn overhead was the previous problem with a
    regular CGI (non FastCGI) form of PHP that made in undesirable in some
    cases. With the FastCGI setup, it’s very efficient and is essentially a
    daemon service like the module form.

    PHP, on the shared hosting servers, does have a upload_max_filesize default
    setting of 4MB. That can be changed either through a php.ini file as was
    done, or via a .user.ini file. The .user.ini file will be checked by the
    server once every five minutes, and won’t need the PHP processes to be
    restarted.

    #66469

    braddalton
    Participant
    Post count: 10222
    #66470

    dev
    Participant
    Post count: 457

    On more thing… if you host is NOT running PHP via CGI (i.e. is running as an Apache module,) you can just put this in the .htaccess file:

    php_value memory_limit 64M

    and your problem should be fixed. However, my guess is you will have to change a php.ini file like Brad suggests above. Some hosts like BH make this easy, some don’t. (Note, we’ve had terrible experiences with huge latency on BH when in the WP admin area and will never recommend them again. If you are using BH I hope your experience is better.)

    #66523

    gregpayette
    Participant
    Post count: 26

    Thanks a lot for all the helpful replies. But it looks like I gotta wait for the reseller to step in. I have limited access, his host won’t deal with me (of course) and even the PHP config in the CP is a “read only” without control options. I’ve always controlled hosting and this is the first time I haven’t. Lesson learned.

    I really appreciate the responses. I will respond with the final solution.

    Greg

    #66525

    RobG
    Participant
    Post count: 1053

    Greg are you buying from a private hosting conpany, like a reseller?


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    #66528

    gregpayette
    Participant
    Post count: 26

    My client asked me to go through his computer tech guy who is a reseller. So I can’t get support directly from the actual host.

    #66534

    RobG
    Participant
    Post count: 1053

    Oh I see I wish you luck getting it fixed.


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    #66573

    braddalton
    Participant
    Post count: 10222
    #66586

    Summer
    Participant
    Post count: 1105

    Second what Brad says.

    That error means your host is only allowing you 32Mb of memory for your account. I think the recommended minimum now is 40Mb, or 64Mb for multisite (although there was that short bit of time where the default minimum had been 256Mb). I also thought most mid-range hosting allowed 64Mb by default for PHP these days.


    #66597

    RobG
    Participant
    Post count: 1053

    I with Brad, it’s no fun if you have to wait on someone to enjoy your hosting account. I use Hostgator and love them.


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    #66659

    gregpayette
    Participant
    Post count: 26

    Yeah I have a couple of different hosts I use and very happy. This just happens to be a strange case where it’s pretty much out of my hands. Thanks for the replies. -Greg

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.