Advertisement:

Author Topic: Way to limit memory usage within SMF without adjusting server?  (Read 1295 times)

Offline GoinNutz

  • Semi-Newbie
  • *
  • Posts: 47
  • Gender: Male
Excuse me if there's a really obvious answer to this, but I didn't find one in https://wiki.simplemachines.org/smf/Main_Page and I'm not having amazing luck with searches either at the moment.

I'm having trouble with a busy forum using an excessive amount of server memory (RAM) and I wonder if there's a way to govern it from within SMF itself.

I'd be grateful for any replies, thank you!

Offline SpacePhoenix

  • Newbie
  • *
  • Posts: 5
Re: Way to limit memory usage within SMF without adjusting server?
« Reply #1 on: August 01, 2017, 02:06:36 AM »
Which version of SMF are you using? Don't know about the other versions but 2.0.14 has the line in the main index.php file

Code: [Select]
@ini_set('memory_limit', '128M');
If you've got that line, try lowering the memory limit there

Offline GoinNutz

  • Semi-Newbie
  • *
  • Posts: 47
  • Gender: Male
Re: Way to limit memory usage within SMF without adjusting server?
« Reply #2 on: August 01, 2017, 10:26:33 AM »
Thanks very much for the response!

Sorry, I should have mentioned:

- Running SMF 2.0.14
- ini_set access is disabled in php.ini on this particular server, no custom php.ini allowed to prevent bypassing limits

I was hoping there was an alternative to the ini_set entry. Shoot :(

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 54,985
  • Gender: Male
    • Kindred-999 on GitHub
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline GoinNutz

  • Semi-Newbie
  • *
  • Posts: 47
  • Gender: Male
Re: Way to limit memory usage within SMF without adjusting server?
« Reply #4 on: October 10, 2017, 02:58:50 PM »
Thank you for the link Kindred, but it's not a load issue with the server - the server itself is very high powered, and the average load is only about 0.5 to 1.5 , and the Load Balancing Thresholds set in SMF are much higher so it's not server load causing interruptions, and lowering them in SMF will just make it unreachable for no reason when this particular server can handle a load of at least 22.5 before it starts to even slow down.

I really need to find a way to make SMF stop using so much server RAM on a busy forum.

Any more ideas and suggestions?

Many thanks!