PHP script... memory problem !?

Hello !

It seems the DH support is unable to read and excruciatingly slow :frowning:

A PHP script for resizing, create thumbnails / preview / copy files… and so on, cannot be execute (no as cron, not in shell) if the jpge files are larger than 15.xx/16MB.

Why… !?
What are the limits and what I need (settings or another server) to run the script ?
And how can I see the memory usage, if the script is running ?

Thank you very much in advance !

Not a real answer, but these links might get you started in the right direction. DreamHost has a limit of 15MB of uploads when using PHP. Supposedly you can change that for your site, but I haven’t tried.


You’d have to ask the script creator what the memory requirements to run the script are.

Also, keep in mind that 15 MB is seriously gigantic for a JPEG image. Your script may be running out of memory while decompressing the image to resize it. (What resolution is the image?)

Thank you, for your feedback !

The files uploaded by ftp… not by the script.

memory_limit = 64M
upload_max_filesize = 64M

How can I see the memory usage, if the script is running ?

@Andrew F
For example: JPEG File with 21.6MB (5616 pixel x 3744 pixel)

memory_get_peak_usage() (assuming the script can complete).

That’s quite a large image. At that resolution, it’d require at least 84 MB of memory while being resized, quite likely more. That’s within our memory limits on its own, but it doesn’t leave much memory for your script, and it would be pretty easy for your script to end up accidentally running out of memory by not disposing of resources properly.

That’s a normal size !

Files with 15.xx MB works, but with 16MB not… i can’t believe your explanation and your support co-worker wrote so much different statement in the last weeks.

I try another webhoster and everything works fine, DH is too unreliable for business use, in every field.

I wouldn’t consider that a fair assessment.