Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: HugeLunatic on August 15, 2024, 05:20:32 AM

Title: Memory Error
Post by: HugeLunatic on August 15, 2024, 05:20:32 AM
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 her (https://www.simplemachines.org/community/index.php?topic=555398.msg3936873#msg3936873)e 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.
Title: Re: Memory Error
Post by: Aleksi "Lex" Kilpinen on August 15, 2024, 06:41:07 AM
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.
Title: Re: Memory Error
Post by: Sir Osis of Liver on August 15, 2024, 04:02:13 PM
How did you do the 2.0 upgrade?
Title: Re: Memory Error
Post by: Steve on August 16, 2024, 07:42:11 AM
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.)
Title: Re: Memory Error
Post by: Kindred on August 16, 2024, 12:32:07 PM
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...
Title: Re: Memory Error
Post by: Doug Heffernan on August 16, 2024, 01:08:10 PM
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.
Title: Re: Memory Error
Post by: Aleksi "Lex" Kilpinen on August 16, 2024, 01:10:45 PM
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.