WordPress.org

Ready to get started?Download WordPress

Forums

Memory limit problem, but weird one (8 posts)

  1. avetma
    Member
    Posted 3 years ago #

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 900 bytes) in /home/gp1/public_html/wp-includes/media.php on line 254

    The weird thing is - that's my first post, image is 900*600px and my memory limit is 96MB! And what's interesting is that wordpress DOES upload that image to gallery, but it seems to be a problem to resize it because I have only "full size" option available.

    The error is gone when I upload smaller image (I tried with 300*300 px - everything went okay) so obviously the problem is resizing. Any ideas?

    Thank you!

  2. s_ha_dum
    Member
    Posted 3 years ago #

    Pixel size doesn't necessarily reflect size in megabytes. Our graphics people like to upload 250x250 images that are better than 120mb, so the first thing is to check your file size in megabytes. Without seeing your setup it is hard to say but I'd bet that the reason you can't resize images is that your host doesn't have PHP's GD library installed/enabled. Without it WordPress won't be able to manipulate your images.

  3. avetma
    Member
    Posted 3 years ago #

    I did phpinfo() and GD library is enabled. About image file size - it's 36 KB, so it's not the problem...

  4. Dion Hulse
    WordPress Dev
    Posted 3 years ago #

    It looks like WordPress has decreased the memory limit to 32M, I'm unsure why that would've occured given the code in question I believe, is supposed to only change it if it's lower than 32M..

    You can attempt to increase the minimum memory_limit in WordPRess by adding this line to your wp-config.php file: define('WP_MEMORY_LIMIT', '96M'); however, WordPress will already be attempting to set the memory limit to 256M for image uploads due to GD's memory condumption issues with large images.

  5. avetma
    Member
    Posted 3 years ago #

    Already tried that and nothing changed, still the same error.

  6. Dion Hulse
    WordPress Dev
    Posted 3 years ago #

    Already tried that and nothing changed, still the same error.

    Tried deactivating your plugins? Something is setting the memory limit to 32M, WordPress sets it to the value of WP_MEMORY_LIMIT, and if you've changed that, that rules out WordPress itself, leaving either your plugins or Theme.

  7. avetma
    Member
    Posted 3 years ago #

    I set defatult theme and deactivated all plugins - still nothing. :/

  8. avetma
    Member
    Posted 3 years ago #

    Whoa! Sorry, problem seems to be in plugins after all; and in three of them - Akismet, comment rating and contact form 7.

    Very peculiar...

Topic Closed

This topic has been closed to new replies.

About this Topic