News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Uploading 9Mb image uses 100Mb of memory?

Started by roshaoar, April 30, 2015, 05:55:04 PM

Previous topic - Next topic

roshaoar

Hi,

Would anyone be able to verify this for me, that uploading a 9Mb attachment uses >100Mb memory?

I am with fasthosts, a large hosting company, on their most expensive business account, and after everything worked fine for a week all of a sudden I can't upload some images anymore, as of last night. I looked in the error logs and I see:
Quotemod_fcgid: stderr: PHP Fatal error: Allowed memory size of 94371840 bytes exhausted (tried to allocate 19712 bytes) in /home/plat-linnas01/e/extreme-macro.co.uk/user/htdocs/forum/Sources/Subs-Graphics.php on line 412, referer: http://extreme-macro.co.uk/forum/macro-discussion/test-21/?action=post;last_msg=61
for 9Mb image. I raised a ticket thinking this must be wrong and the support person tells me:
QuoteRegarding your email, the max upload size was not exceeded but the memory limit is. Every time you will upload the file, this will exhaust the memory limit of your server. You can remove unnecessary files in the new forum application that you have installed or even remove the forums that you have installed in your server that you no longer need so the memory limit of your server will not be exceeded.

Is this right?

Thank you for your time,

-Johan

vbgamer45

Yes that is common. I usually set my memory limit to 256mb in most cases. Graphic resizing involves a ton of memory space.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

roshaoar

Well I never - thanks for clueing me up :)

You say resizing though - I take it the resizing part is making the thumbnail? There's nothing I as just the server user can do about that?

Thanks again

vbgamer45

Yes that is what it is doing. You can maybe disable resizing?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

roshaoar

Fixed :). Changed @ini_set('memory_limit' to 256M from default 90M in Subs-Graphics.php, problem gone

Advertisement: