Advertisement:

Author Topic: Disabling resource intensive features based on server load  (Read 48520 times)

Offline Ben_S

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,725
  • xxx
Disabling resource intensive features based on server load
« on: March 14, 2006, 04:33:04 PM »
SMF 1.1 introduces a new feature.

This new feature can be used to disable certain other features that can be hard on the server depending upon the server load.

Note, it is not recommended that you use these options if you are on a shared server as other users load will affect your board and you may find it being disabled when it doesn’t need to be.

There is no admin interface for this feature to prevent people enabling the feature and locking themselves out of their forum.  You will need to enable it with phpMyAdmin (What is phpMyAdmin?).  This way you can just go back to phpMyAdmin and undo the changes.

To enable it, run the following query (you may with to adjust the values before hand)

Code: [Select]
REPLACE INTO smf_settings
   (variable, value)
VALUES ('loadavg_enable', '1'),
   ('loadavg_forum', '40.0'),
   ('loadavg_auto_opt', '1.0'),
   ('loadavg_search', '2.5'),
   ('loadavg_allunread', '2.0'),
   ('loadavg_unreadreplies', '3.5'),
   ('loadavg_show_posts', '2.0');

This will disable the forum completely if the server load is above 40, automatic database table optimization with a load above 1, search with a load above 2.5, users “show all unread posts” at 2, users “show all unread replies” at 3.5 and the profile > show users posts at a load of 2.

If you need to tweak any of the settings, you can just do a REPLACE INTO, e.g. to turn the feature off, you can run

Code: [Select]
REPLACE INTO smf_settings
   (variable, value)
VALUES ('loadavg_enable', '0');
« Last Edit: March 14, 2006, 06:00:32 PM by Amacythe »
Liverpool FC Forum with 14 million+ posts.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,505
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Disabling resource intensive Features based on server load
« Reply #1 on: March 14, 2006, 04:35:16 PM »
Sweeet!! Cant' wait till SMF 1.1. This is going to rock!
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

Offline ediww

  • Semi-Newbie
  • *
  • Posts: 95
  • Gender: Male
    • Форуми към БГ-Мамма
Re: Disabling resource intensive features based on server load
« Reply #2 on: September 09, 2006, 08:14:18 AM »
hi there, are the dots in the values required at all?
Beep-beep-beep. Beep-woop-woo. Beep-boop.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,505
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Disabling resource intensive features based on server load
« Reply #3 on: September 09, 2006, 09:17:08 AM »
The dot's aren't required mainly there if you want to get to an exact limit
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

Offline qtime

  • Full Member
  • ***
  • Posts: 501
Re: Disabling resource intensive features based on server load
« Reply #4 on: February 25, 2007, 05:50:54 PM »
Is it possible to set different values according certain membergroups?

Offline Ben_S

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,725
  • xxx
Re: Disabling resource intensive features based on server load
« Reply #5 on: February 25, 2007, 07:50:59 PM »
No
Liverpool FC Forum with 14 million+ posts.

Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 876
  • Gender: Male
Re: Disabling resource intensive features based on server load
« Reply #6 on: October 11, 2007, 06:56:44 AM »
Code: [Select]
REPLACE INTO smf_settings
   (variable, value)
VALUES ('loadavg_enable', '1'),
   ('loadavg_forum', '40.0'),
   ('loadavg_auto_opt', '1.0'),
   ('loadavg_search', '2.5'),
   ('loadavg_allunread', '2.0'),
   ('loadavg_unreadreplies', '3.5'),
   ('loadavg_show_posts', '2.0');

This will disable the forum completely if the server load is above 40, automatic database table optimization with a load above 1, search with a load above 2.5, users “show all unread posts” at 2, users “show all unread replies” at 3.5 and the profile > show users posts at a load of 2.

Discussion around this feature (which I was completely unaware of) has come up again in the MODs forum again and I would just like to ask:

1. The feature "Disable Forum" means that forum goes to Maintenance Mode?

2. Does anyone know the "best" tweaking values for each option? I'm not familiar with server load values, so I really don't know if values should be tweaked according to server-type, to forum size, to forum bandwidth, or if any other parameter should be taken into account.

Offline Ben_S

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,725
  • xxx
Re: Disabling resource intensive features based on server load
« Reply #7 on: October 11, 2007, 07:38:02 AM »
1. Not Maintenance Mode, it uses a fatal error message (as far as I remember) to show the server load is currently too high, all access will be denied including admins.

2. There are no best values, they are entirely dependent upon the server you are on, if you are not on a dedicated server, I'd suggest you don't even bother with this feature since 90% of the time, the load will not be caused by your forum.
Liverpool FC Forum with 14 million+ posts.

Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 876
  • Gender: Male
Re: Disabling resource intensive features based on server load
« Reply #8 on: October 11, 2007, 09:55:39 AM »
Tkx ;).

I just wondered if I should get worried with that.
Our forum, which consumes about 50 Gb bandwidth / month, had 1Gb disk space to use - 250 Mb for MySQL database and 410 Mb free space - and it crashed twice because of not enough disk space to execute those "temporary" MySQL table operations... but now it was upgraded to 5Gb and everything is smooth now.

But it's surely too small yet to cause any server load... ;D

Offline Col

  • Sr. Member
  • ****
  • Posts: 964
Re: Disabling resource intensive features based on server load
« Reply #9 on: October 13, 2007, 10:11:38 PM »
Hi Ben,

I understand that this should not be used in shared server environment, but what if the server has mod_perl2 installed? This enables resources to be assigned to individual accounts - might it be possible to use the individually assigned resource levels so that peoples' forums aren't being disabled because of a high total server load?

Offline 青山 素子

  • Server Team
  • SMF Super Hero
  • *
  • Posts: 17,068
  • 戦場ヶ原、蕩れ!
    • srvrguy on GitHub
    • @motokochan on Twitter
    • Nekomusume Moe
Re: Disabling resource intensive features based on server load
« Reply #10 on: October 14, 2007, 06:00:35 PM »
mod_perl doesn't have anything to do with resource assignment, it is merely a way to run perl scripts inside the Apache process instead of as a CGI.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Offline se7o.com

  • Sophist Member
  • *****
  • Posts: 1,070
Re: Disabling resource intensive features based on server load
« Reply #11 on: November 07, 2009, 03:32:22 PM »
it show this error

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'loadavg_forum', '7.0'' at line 1

Offline Kill Em All

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,144
  • Gender: Male
  • Something has to go wrong. Just has to.
    • KEAGaming
Re: Disabling resource intensive features based on server load
« Reply #12 on: February 07, 2010, 09:59:32 PM »
se7o.com, this post is quite old, MySQL probably had revisions and the code has probably changed, that is why it probably wont work.
My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Offline Something like that

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,496
  • Gender: Male
  • ]
Re: Disabling resource intensive features based on server load
« Reply #13 on: February 08, 2010, 10:28:05 AM »
se7o.com, this post is quite old, MySQL probably had revisions and the code has probably changed, that is why it probably wont work.

That's standard SQL that's been around for decades. It's possible that he copied and pasted incorrectly.

Offline Ricky.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,057
    • Indian Linux Forums
Re: Disabling resource intensive features based on server load
« Reply #14 on: December 31, 2010, 02:22:43 AM »
I know this post is quite old but its very helpful as it saves your forum if there is sudden spike or something. However, is there way to customize message it shows and also to not to lock down forum for Admin?

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,542
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: Disabling resource intensive features based on server load
« Reply #15 on: December 31, 2010, 02:27:33 AM »
You can probably customize the message somehow, can't remember how this worked on 1.1 - but you can not make it so that it would care about your membergroup.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7 990X @ 3,47Ghz / 12Gb / Win 10 x64 / 3840x2160


How you can help SMF

"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

Offline Ricky.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,057
    • Indian Linux Forums
Re: Disabling resource intensive features based on server load
« Reply #16 on: December 31, 2010, 09:42:47 AM »
Ok, which part or what files deal with this settings.. .. that way I can look into myself !

Offline Dzonny

  • Localizer
  • SMF Super Hero
  • *
  • Posts: 11,923
  • Gender: Male
  • No sleep...
    • dzontra.nikola on Facebook
    • Dzonny on GitHub
    • dzontranikola on LinkedIn
    • @opusteniforum on Twitter
    • Samo opusteno
Re: Disabling resource intensive features based on server load
« Reply #17 on: January 01, 2011, 01:00:44 PM »
This is really work?
It would be very helpflu to have somthing like this in admin panel.
Quote
This will disable the forum completely if the server load is above 40, automatic database table optimization with a load above 1, search with a load above 2.5, users “show all unread posts” at 2, users “show all unread replies” at 3.5 and the profile > show users posts at a load of 2.
by "server load above 40", u mean if server ram memmory is above 40% or what? :D

Offline qtime

  • Full Member
  • ***
  • Posts: 501
Re: Disabling resource intensive features based on server load
« Reply #18 on: January 01, 2011, 01:06:39 PM »
This is really work?
It would be very helpflu to have somthing like this in admin panel.
Quote
This will disable the forum completely if the server load is above 40, automatic database table optimization with a load above 1, search with a load above 2.5, users “show all unread posts” at 2, users “show all unread replies” at 3.5 and the profile > show users posts at a load of 2.
by "server load above 40", u mean if server ram memmory is above 40% or what? :D
please check this http://www.lifeaftercoffee.com/2006/03/13/unix-load-averages-explained/ to find out.

Offline Dzonny

  • Localizer
  • SMF Super Hero
  • *
  • Posts: 11,923
  • Gender: Male
  • No sleep...
    • dzontra.nikola on Facebook
    • Dzonny on GitHub
    • dzontranikola on LinkedIn
    • @opusteniforum on Twitter
    • Samo opusteno
Re: Disabling resource intensive features based on server load
« Reply #19 on: January 01, 2011, 01:12:49 PM »
Right, thank you, just read that, and get it :) I didnt know about that, couse i just moved from share to vps server.
So, anyone is using this on public forum? Is it working? Can it work with 1.1.12 version? :)

Offline qtime

  • Full Member
  • ***
  • Posts: 501
Re: Disabling resource intensive features based on server load
« Reply #20 on: January 01, 2011, 01:16:26 PM »
yes it's working at 1.1.2

don't be afraid if your serverload is 10 and your forum is fast.

Offline Dzonny

  • Localizer
  • SMF Super Hero
  • *
  • Posts: 11,923
  • Gender: Male
  • No sleep...
    • dzontra.nikola on Facebook
    • Dzonny on GitHub
    • dzontranikola on LinkedIn
    • @opusteniforum on Twitter
    • Samo opusteno
Re: Disabling resource intensive features based on server load
« Reply #21 on: January 01, 2011, 01:37:17 PM »
yes it's working at 1.1.2
U mean 1.1.12?  :D

don't be afraid if your serverload is 10 and your forum is fast.
Serverload is currently below 1.5 for each 5, 10 and 15min. As i can get, it is fine, right?

Offline qtime

  • Full Member
  • ***
  • Posts: 501
Re: Disabling resource intensive features based on server load
« Reply #22 on: January 01, 2011, 01:42:58 PM »
yes working at 1.1.2 and serverload is very nice.
To protect overloading of the server, you could setup search to 5 for example. If the server is higher loaded, it will avoid searching and serverload could drop.

Offline 青山 素子

  • Server Team
  • SMF Super Hero
  • *
  • Posts: 17,068
  • 戦場ヶ原、蕩れ!
    • srvrguy on GitHub
    • @motokochan on Twitter
    • Nekomusume Moe
Re: Disabling resource intensive features based on server load
« Reply #23 on: January 01, 2011, 01:48:17 PM »
This is really work?
It would be very helpflu to have somthing like this in admin panel.

Bad idea. Most users would be somewhat clueless on the settings and could easily enter them in low enough that they would effectively shut down their forum. The only way to recover would be to edit the settings directly in the database. Someone who didn't know enough to use the settings correctly would likely not know how to make the necessary database edits to fix the damage.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Offline Dzonny

  • Localizer
  • SMF Super Hero
  • *
  • Posts: 11,923
  • Gender: Male
  • No sleep...
    • dzontra.nikola on Facebook
    • Dzonny on GitHub
    • dzontranikola on LinkedIn
    • @opusteniforum on Twitter
    • Samo opusteno
Re: Disabling resource intensive features based on server load
« Reply #24 on: January 01, 2011, 01:51:08 PM »
Hm right, but i just have my own forum on vps, and dont plan any clients there for now.

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,542
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: Disabling resource intensive features based on server load
« Reply #25 on: January 01, 2011, 02:15:50 PM »
Actually, 2.0 has this built into the Admin CP, as part of the server settings... ::)
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7 990X @ 3,47Ghz / 12Gb / Win 10 x64 / 3840x2160


How you can help SMF

"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

Offline 青山 素子

  • Server Team
  • SMF Super Hero
  • *
  • Posts: 17,068
  • 戦場ヶ原、蕩れ!
    • srvrguy on GitHub
    • @motokochan on Twitter
    • Nekomusume Moe
Re: Disabling resource intensive features based on server load
« Reply #26 on: January 01, 2011, 04:11:52 PM »
Actually, 2.0 has this built into the Admin CP, as part of the server settings... ::)

Indeed it does (Configuration -> Server Settings -> Load Balancing), albeit with a red warning. I recall a push to get many of the "hidden" settings added to the UI.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Offline Dzonny

  • Localizer
  • SMF Super Hero
  • *
  • Posts: 11,923
  • Gender: Male
  • No sleep...
    • dzontra.nikola on Facebook
    • Dzonny on GitHub
    • dzontranikola on LinkedIn
    • @opusteniforum on Twitter
    • Samo opusteno
Re: Disabling resource intensive features based on server load
« Reply #27 on: January 01, 2011, 06:33:57 PM »
Hm, ok, is it the same system as posted here in the first post?
Im using 1.1.12, and i will try it to see if its working.
« Last Edit: July 18, 2011, 12:11:52 PM by Dzonny »

Offline 青山 素子

  • Server Team
  • SMF Super Hero
  • *
  • Posts: 17,068
  • 戦場ヶ原、蕩れ!
    • srvrguy on GitHub
    • @motokochan on Twitter
    • Nekomusume Moe
Re: Disabling resource intensive features based on server load
« Reply #28 on: January 01, 2011, 09:57:51 PM »
Hm, ok, is it the same system as postet here in forst post?
Im using 1.1.12, and i will try it to see if its working.

Yes. Be careful, you can make your forum unusable.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 876
  • Gender: Male
Re: Disabling resource intensive features based on server load
« Reply #29 on: July 18, 2011, 11:42:40 AM »
Sorry to push this old thread up, but I want to use this to disable the feature that allows guests to browse the forum abobe a certain load. Would it be possible to do it and if so what is the parameter/function?

Offline 青山 素子

  • Server Team
  • SMF Super Hero
  • *
  • Posts: 17,068
  • 戦場ヶ原、蕩れ!
    • srvrguy on GitHub
    • @motokochan on Twitter
    • Nekomusume Moe
Re: Disabling resource intensive features based on server load
« Reply #30 on: July 18, 2011, 11:56:44 AM »
As far as I know, that is not currently an option. The load options allow one to disable certain high-load-causing features, but browsing is not one.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: Disabling resource intensive features based on server load
« Reply #31 on: July 18, 2011, 05:45:58 PM »
In 2.0 the threasholds are:
Threshold to disabling automatic database optimization
Threshold to disabling search
Threshold to disabling all unread topics
Threshold to disabling unread replies
Threshold to disabling showing user posts
Threshold to disabling the forum completely
Details: Load Balancing.

The last one seems what Paracelsus is looking for, but it affects all the users, not only guests.


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline 青山 素子

  • Server Team
  • SMF Super Hero
  • *
  • Posts: 17,068
  • 戦場ヶ原、蕩れ!
    • srvrguy on GitHub
    • @motokochan on Twitter
    • Nekomusume Moe
Re: Disabling resource intensive features based on server load
« Reply #32 on: July 18, 2011, 06:10:06 PM »
Threshold to disabling the forum completely
Details: Load Balancing.

The last one seems what Paracelsus is looking for, but it affects all the users, not only guests.

Exactly. That one shouldn't be used as a default. It effectively does the same thing as setting maintenance mode to 2, which makes the forum inaccessible to everyone, even admins.

Potentially, the system could be extended to allow this, but I'm not sure how big a benefit would be provided since you'd still have to allow logins, which would increase load anyway.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 876
  • Gender: Male
Re: Disabling resource intensive features based on server load
« Reply #33 on: July 19, 2011, 01:48:52 AM »
Well, since we are dedicated to a sports, mainly football (soccer) club, the loads tend to peak in specific periods, ie, during the club's football matches. In our experience, disabling browsing to guests in these couple of hours allows the forum to become much more responsive and faster than without this option.

Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 876
  • Gender: Male
Re: Disabling resource intensive features based on server load
« Reply #34 on: July 19, 2011, 02:37:25 AM »
The only function I can find on smf_settings.php that might do the trick is this one: allow_guestAccess, but Subs-Auth has the KickGuest function also.

Could this actually work?
Code: [Select]
REPLACE INTO smf_settings
   (variable, value)
VALUES ('loadavg_enable', '1'),
   ('loadavg_allow_guestAccess', '40.0');

Subs-Auth.php has this piece of code:
Code: [Select]
// Kick out a guest when guest access is off...
function KickGuest()
{
global $txt, $context;

loadLanguage('Login');
loadTemplate('Login');

$_SESSION['login_url'] = $_SERVER['REQUEST_URL'];

$context['sub_template'] = 'kick_guest';
$context['page_title'] = $txt[34];
}

Would it make sense to be like this:
Code: [Select]
REPLACE INTO smf_settings
   (variable, value)
VALUES ('loadavg_enable', '1'),
   ('loadavg_KickGuest', '40.0');

Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 876
  • Gender: Male
Re: Disabling resource intensive features based on server load
« Reply #35 on: July 19, 2011, 03:12:53 AM »
Ok, maybe the above isn't such a good solution after all...

What about this one: install this MOD - High Server Load Warning (http://custom.simplemachines.org/mods/index.php?mod=2699) and then on index.template.php replace this:

Code: [Select]
$load = sys_getloadavg();
if ($load[0] > $modSettings['amount_server_load_check'] && !empty($modSettings['enable_server_load_check'])) {
    echo '<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/hslw.js"></script>

<div id="topbar">
<table width="100%">
<tr>
<td width="99%">
', $txt['text_server_load_check'], '&nbsp;&nbsp;&nbsp; </td><td width="1%"><a onclick="closebar(); return false"><img style="float: left" src="', $settings['images_url'], '/icons/hslw-close.gif" border="0"></a>

</td>
</tr>
</table>
</div>';
}

with something like this:
Code: [Select]
$load = sys_getloadavg();
if ($load[0] > $modSettings['amount_server_load_check'] && !empty($modSettings['enable_server_load_check']))
{
require_once($sourcedir . '/Subs-Auth.php');
return 'KickGuest';
}

 ???

Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 876
  • Gender: Male
Re: Disabling resource intensive features based on server load
« Reply #36 on: July 28, 2011, 05:46:21 AM »
So, in the end, it was even easier and simpler. This worked for me:

Put somewhere in Index.php between the if's this piece (I've put after the line "// Is the forum in maintenance mode?"):
Code: [Select]
$load = sys_getloadavg();
in Index.php turn this:
Code: [Select]
// If guest access is off, a guest can only do one of the very few following actions.
elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('coppa', 'login', 'login2', 'register', 'register2', 'reminder', 'activate', 'smstats', 'help', 'verificationcode'))))
{
require_once($sourcedir . '/Subs-Auth.php');
return 'KickGuest';
}

into this (the load 15 is just an example that can be adjusted to whatever value people want to):
Code: [Select]
// If guest access is off, a guest can only do one of the very few following actions.
elseif ((empty($modSettings['allow_guestAccess']) || ($load[0] > 15)) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('coppa', 'login', 'login2', 'register', 'register2', 'reminder', 'activate', 'smstats', 'help', 'verificationcode'))))
{
require_once($sourcedir . '/Subs-Auth.php');
return 'KickGuest';
}

Offline humbleworld

  • Sr. Member
  • ****
  • Posts: 886
    • best article
Re: Disabling resource intensive features based on server load
« Reply #37 on: January 28, 2013, 11:07:50 PM »
Can I use this option for our VPS? Memory is 1.2 GB. Bandwidth is 3,500GB. Space is 60GB.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,401
    • StoryBB/StoryBB on GitHub
Re: Disabling resource intensive features based on server load
« Reply #38 on: January 28, 2013, 11:13:08 PM »
...it's built into SMF since 1.1 and even has the Load Balancing page in the admin panel since 2.0 RC2...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.