Fatal Error: Memory Exhausted
|
Posted
#67434
(In Topic #14375)
|
|
|---|---|
|
Fan in training |
This is my first time posting here so go easy on me. I have an unusual problem on my site that I have not been able to figure out why I keep getting the error. The error is the following: To make long story short, I upgraded my site from v5.0.3 to v6. This error comes in play when any user in the community tries to upload an image to the gallery. This error only happens on v6. When I roll back to v5.0.3 this error doesn't come up. The only thing I can think of is that something was changed on v6 in which is causing this error. What that may be I'm not sure as I haven't played around long enough with this new CMS. So I humbly ask for help here if you can help me pinpoint my problem. I would greatly appreciate it. Oh and before I forget, the images that were uploaded were not that big at all. They range from around 500kb to 2-3MB. Thank you for any assistance. ^^ |
|
Posted
|
|
|
Community saint |
I had memory problems with v5.0.3 at my old host which ment every time I did a search on the admin screen it would run out of memory. Their allocation was 128MB. When I moved to my new host the first thing I tried was the search and all was well. When I checked how much memory the new host allocated to me it was 500MB, a big difference. I'm sure v6 uses more memory then v5.0.3. Its fairly common that newer versons of software typically use more memory then previous ones as functionality increases between versions. I doubt that the size of the files being uploaded (anything more then a few hundred KB anyway) has anything to do with your problem. You are probably just operating at the edge of available memory. Your host will also have a max upload file size limit (my previous host was only 2MB) but I don't think that is being reached because I would expect some sort of disk space error and not a memory error.
Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
|
|
Posted
|
|
|
Fan in training |
And if this is the case, I may either have to stick with v5.0.3 or possibly another CMS, as having a functional Gallery is necessary for the type of site I will be running. |
|
Posted
|
|
|
Community saint |
I'm sure Chris Graham, or others from ocProducts, will enlighten us. Have you actually asked you host about getting an increase?
Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
|
|
Posted
|
|
|
Fan in training |
|
|
Posted
|
|
|
ocStaff (admin) |
If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
|
ocStaff (admin) |
If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
|
Fan in training |
I started uploading different resolution type of images ranging from less than 1024px up to about 4000-5000px and came across this error after uploading 3 images:
No matter what image I upload now, even if its small, it wont upload and give me this error. Thank you for the help guys. |
|
Posted
|
|
|
Community saint |
This sounds very much like my web hosts, HOSTGATOR. I've encountered this 'problem' several times in the past, and another that you might also come across, which I will list here …
Voilá, the problem goes away! Give it a try. Nothing to lose.
Take my advice. I'm not using it!
View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal |
|
Posted
|
|
|
ocStaff (admin) |
If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
|
Fan in training |
What's pretty funny is that, that IS my current webhost. XD I have done both but still get the error. Fatal error: Out of memory (allocated 72351744) (tried to allocate 20000 bytes) in /home/xxxxx/public_html/dev/sources/images.php on line 477 I cleared the cache before re-trying. Thanks again for the help.
Last edit: by Goshujin-sama
|
|
Posted
|
|
|
Community saint |
Just F.Y.I. In v6 and without Chris' patches the maximum image size the thumbnailer can handle on my server is approximately 2,270×2,270. For me that's not an issue as the max size I expect to be uploaded is 1920x1080.
Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
|
|
Posted
|
|
|
Fan in training |
I noticed this as well. Any reason why that is? Is it due to GD? Which reminds me, there is a setting under Configuration -> Feature Options -> Galleries -> "Maximum Image Size". What is that for then? O.o |
|
Posted
|
|
|
Community saint |
As the description for that property states "this only works if the GD image library is enabled" I'm guessing that the GD image library is not actually installed on our servers and therefore this limit is not being enforced.
Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
|
|
Posted
|
|
|
ocStaff (admin) |
Code
:ini_set('memory_limit','-1'); echo ini_get('memory_limit');
This is all involving GD. You see, PHP has this memory limit setting (for good reason) so scripts can't use too much. When it has to work with images it has to load them up uncompressed, which uses relatively large amounts of RAM (width*height*4*fudgeFactor bytes). Obviously if you double the width of a square image you quadruple the RAM usage, so it jumps up fast. I am actually going to try and implement support for presizing large image to something smaller using something else called ImageMagick, which should bypass PHP's memory limit. If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
|
Community saint |
I get "-1". What info/instructions can I give to my host to get them to fix this (hey, you never know, they may actually be willing to do something about it, they have been helpful so far with other issues/request)? I'm not getting the error now, but I'm just trying to be prepared in case my memory allocation gets reduced in the future.
Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
|
|
Posted
|
|
|
ocStaff (admin) |
The problem is if the memory limit is disableable like demonstrated on this line and then you still get memory errors from ocPortal screens that disable the memory limit. If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
|
ocStaff (admin) |
If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
|
Community saint |
Tested with an 8000x8000 jpeg and no image too large errors.
Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
|
|
Posted
|
|
|
Fan in training |
I still keep getting errors Fatal error: Out of memory (allocated 72351744) (tried to allocate 5000 bytes) in /home/xxxxx/public_html/dev/sources/images.php on line 506 I get a return of -1 as well, and under php.ini through cPanel I can't edit "memory_limit". So then this means since I'm still getting errors, that something is wrong on my web host? If so, could you please elaborate on why this is? I think using ImageMagick would work out better than GD, as I use another CMS using ImageMagick on the same host, and have no problems with uploading and resizing images. I want to thank you all again for the great support. |
1 guests and 0 members have just viewed this: None
Control functions:








Last edit: by