Memory Error

Started by HugeLunatic, August 15, 2024, 05:20:32 AM

Previous topic - Next topic

HugeLunatic

This all started with my host doing maintenance, I have no idea what it was exactly, but it broke this forum with only a blank page.  I have another smf (2.0.17) and wordpress also hosted with them which both work fine. I'm the only person with server access, and there is one other person that has admin access on this forum. 

Trying repair_settings.php did not fix the forum, so I did the clean install files using instructions from here.  I had mods installed, all of them uninstalled before resetting to clean files. This has fixed it to the point I'm at now.

The forum with the issue is gardenofshadows.org.  All seems to work except for things to do with members.  If I choose Members from the top nav bar I get the following error:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 82 bytes) in /home/gosadmin/gardenofshadows.org/Sources/Load.php on line 892
If I choose Members from the side panel in Admin I get the following error:
Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.

At this point I attempted to upgrade to 2.0.19, which gave me errors I forgot to document as it was numerous and not a single page would load.  So I would like to fix this error before attempting to upgrade again. Unsure if the upgrade failure had to do with this error or if it was due to I didn't have ftp access and was manually uploading files via file manager (can't replace whole folders.)

My host is A2 hosting, and other than this issue they have been a great host. They helped with php version and initially increasing the memory. The server in general is set to php 5.5, I set this as my intention was to upgrade to 2.0.19.  This did not allow this forum to load though.  So in the .htacces I added the following, which then loaded the forum.
<FilesMatch ".(php4|php5|php3|php2|php|phtml)$">
    SetHandler application/x-httpd-alt-php44___lsphp
</FilesMatch>

In cPanel, where I have set the php version, the memory_limit is set to 2Gb.  This didn't help so I've also added the following to .htaccess.
php_value memory_limit 512M
The host thinks it's an smf thing, and has linked to another post here regarding limiting memory usage.  However the suggestion given doesn't appear to exist in this version of smf.  The site is usually using Cloudflare, but it's suspended for this site currently.  I don't think the site is busy, usually about 45-50Gb of traffic per month.

Again, I would like to fix the current issue before attempting to upgrade.

Aleksi "Lex" Kilpinen

If your server doesn't follow the settings you have made in cPanel, it's best you turn to your host.
The "Allowed memory size" error is not an SMF error, but a PHP error, and the 8M limit smells like an old php.ini default to me.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

How did you do the 2.0 upgrade?
When in Emor, do as the Snamors.
                              - D. Lister

Steve

Quote from: Sir Osis of Liver on August 15, 2024, 04:02:13 PMHow did you do the 2.0 upgrade?

Quote from: HugeLunatic on August 15, 2024, 05:20:32 AMI didn't have ftp access and was manually uploading files via file manager (can't replace whole folders.)
My pet rock is not feeling well. I think it's stoned.

Kindred

to do the upgrade - you should have uploaded the upgrade ZIP file and then extracted it in place....  that way you don't miss some of the files buried a dozen directories deep...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Doug Heffernan

Quote from: HugeLunatic on August 15, 2024, 05:20:32 AMUnsure if the upgrade failure had to do with this error or if it was due to I didn't have ftp access and was manually uploading files via file manager (can't replace whole folders.)

All files/folders will have to be overwritten/replaced for the upgrade to work. The method mentioned by @Kindred above should do just that.

Aleksi "Lex" Kilpinen

#6
But the actual original issue is the 8M memory limit, and it's not out of the question that all the rest of the issues described stem from that limit (or inability to change PHP config) as well, so I would agree it's a good idea to try and work that one out first, as the OP suggested. In general it's often a good idea to concentrate on one issue at a time anyways.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: