Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#11680 closed defect (bug) (invalid)

wp_load_image() out of memory

Reported by: scribu Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.9
Component: Media Keywords:
Focuses: Cc:


On a host with 128M, I get:

Fatal error: Out of memory (allocated 39321600) (tried to allocate 1232 bytes) in .../wp/wp-admin/includes/image.php on line 163

Change History (12)

comment:1 @scribu6 years ago

  • Cc scribu@… added

comment:2 @Denis-de-Bernardy6 years ago

  • Cc Denis-de-Bernardy added
  • Milestone changed from Unassigned to 2.9.1

comment:3 @Denis-de-Bernardy6 years ago

that's 32MB, btw. the host must be ignoring your 128MB value.

comment:4 @scribu6 years ago

I got the 128M value by doing var_dump(ini_get('memory_limit'))

comment:5 @dd326 years ago

that's 32MB, btw. the host must be ignoring your 128MB value.

Hmm allocated 39321600 isnt that more like 37MiB? Is it possible the host server was literally, out of memory?

comment:6 @miqrogroove6 years ago

scribu, was this image in excess of 5 megapixel?

comment:7 @scribu6 years ago

Width: 1232 pixels

Height: 1840 pixels

Size: 571KB

comment:8 @miqrogroove6 years ago

Such a small image should not require 37 MB, nor 32 MB nor 128 MB. Is the error reproducible? Can you attach the file for us?

comment:9 @scribu6 years ago

I've tried with several images of similar sizes and they all fail on the live site.

On localhost it works fine, even with larger images. So I'm tempted to think the host is the source of the problem.

comment:11 @miqrogroove6 years ago

Is your localhost limited to 32 MB? One thing to try for server-specific issues is to run memory_get_usage() without wp_load_image() and see if the baseline number is unreasonably high.

comment:12 @scribu5 years ago

  • Milestone 3.0 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Can't reproduce anymore.

Note: See TracTickets for help on using tickets.