PDA

View Full Version : Close Search during high server load


Brad
07 Jun 2005, 13:14
With this plug-in installed you can disable your search engine when the server load gets to high. This plug-in add's a new vBoption in the Sever Settings page where you can define your server load.

This plug-in acts exactly like the regular server load limiter but only works on search.php.


Version History

Current Version: 1.0.1

Added installer, no other changes between this and 1.0.0. If you already have 1.0.0 installed there is no reason to upgrade!

Past Versions:

1.0.0:

Released Code to public

Flexo
17 Jun 2005, 21:19
Do I see this right that this plugin itself uses 3 SQL queries? If so, only when the search.php is loaded or with every PI?

Andreas
17 Jun 2005, 21:22
The Plugin does not use any Queries at all.
The queries are only necessary once to create the new Setting and the Phrases for this setting.

Flexo
17 Jun 2005, 21:35
The queries are only necessary once to create the new Setting and the Phrases for this setting.
No idea what this means...

The Plugin does not use any Queries at all.
... but this I get ;)

Thanks.

Andreas
17 Jun 2005, 21:40
Those 3 Queries from the Readme create a new Setting (in ACP / vBulletin Options / vBulletin Options / Server Settings & Optimization Options) and insert the Text that should be displayed for this setting.

Flexo
17 Jun 2005, 22:39
Ah, ok, thanks a lot.

Christine
23 Jun 2005, 01:54
Thanks for porting this!

Brad
27 Jun 2005, 07:18
I've added a installer script and dubbed the new version 1.0.1. There are no code changes so if you already installed this hack you are already running 1.0.1.

JamesFrost
27 Jun 2005, 09:27
I've added a installer script and dubbed the new version 1.0.1. There are no code changes so if you already installed this hack you are already running 1.0.1.
great idea - could something similar be done with sendmail.php, to only send emails when the server load is at an acceptable level?

Dean C
27 Jun 2005, 10:30
Fixed the type in your thread title Brad ;)

MPDev
28 Jun 2005, 19:04
Nice, I did this for 3.0 here (http://www.vbulletin.org/forum/showthread.php?t=81259).

peterska2
23 Jul 2005, 17:45
Hey Brad :)

You have a typo in line 16 of your installer. You have PREIX instead of PREFIX.

Other than that, installs like a dream :)

Good Work :)

Brad
23 Jul 2005, 18:15
Hey Brad :)

You have a typo in line 16 of your installer. You have PREIX instead of PREFIX.

Other than that, installs like a dream :)

Good Work :)

Thanks for letting me know, zip file updated.

I updated it with my mom's pos dell so let me know if it is still wrong or has any other errors. :)

peterska2
23 Jul 2005, 18:29
Apart from that one little thing it ran smoothly. Nothing to worry about for you there.

vibe
10 Oct 2005, 02:43
installed!

vissa
06 Dec 2005, 09:24
Very useful and goes along nicely with some other plugins/mods that use the search feature a lot. It could be a little easier to install with a description of where the options are, what exactly to do, etc.

Developer
08 Dec 2005, 20:08
powerful hack
installed

AWI
09 Dec 2005, 07:12
Installed this, where exactly do I go to set the load limit? Thanks

kommuni
17 Dec 2005, 00:21
Installed this, where exactly do I go to set the load limit? Thanks

also can't find it under the serversettings :(

HeRCuL70
17 Dec 2005, 20:05
sorry, is this hack working with windows 2003? It seems for lunix server. doesnt it?

vissa
22 Dec 2005, 00:57
What's the difference between this mod and the other one here
http://www.vbulletin.org/forum/showthread.php?t=102882&highlight=search+load

-vissa

bada_bing
11 Jan 2006, 20:02
Two questions before I download.

Will this hack work on a Windows Server?
Also is there a way to code this so that the search feature is only available for certain usergroups at HIGH Server load?

For example if the threshhold is high on the server instead of denying everyone access to search to only deny certain usergroups. so that if the server is at a high rate then the admins, mods & Premium Members can still search but everyone else get a server load high message or chaeck back whatever you want to display as a message?

bada_bing
03 Feb 2006, 15:55
Can someone answer my questions please

bada_bing
07 Feb 2006, 03:23
Nice hack to bad there is no support..

MissKalunji
23 Feb 2006, 05:50
installed will be testing soon

MissKalunji
23 Feb 2006, 06:02
what do i input in : Search Server Load Limit
Just like the *NIX load limit setting, but only prevents access to searching when the server load is to high

Drache
23 Feb 2006, 08:24
This looks like a very useful plugin thanks. :D

What do you suggest to set the server load limit for search? 5? 10?

beano33
24 Feb 2006, 21:29
great idea - could something similar be done with sendmail.php, to only send emails when the server load is at an acceptable level?

I'd add display users online, display users browsing forums, and display users browsing threads to that as well.

ThorstenA
28 Mar 2006, 10:40
I would like not to disable search forums in busy times, but increase the time between search queries.

Snake
28 Mar 2006, 13:06
Awesome, I find this very useful!

DementedMindz
16 Apr 2006, 03:59
question is how do we remove it? if we no longer want it?

vBB-vietnam
16 Apr 2006, 09:00
Is it only active with Linux Server ?

Bieddos
05 May 2006, 09:25
sorry but... where i can set the limit for search nix load???

Bieddos
09 May 2006, 13:39
sorry but... where i can set the limit for search nix load???
no support for 3.5.4... this option there isn't in server option.... is not this hack compatible with 3.5.4???

DementedMindz
22 Jun 2006, 16:43
ok brad ill ask again... how do we remove it? if we no longer want it?

zooman
02 Jul 2006, 12:57
anyone tested on 3.6

Ghanem
01 Sep 2006, 19:45
anyone tested on 3.6Any one please :)

Cybershaolin
12 Dec 2006, 01:47
Does it work with 3.6.4?

Indy
17 Dec 2006, 23:22
I just got it working in my test/dev 3.6.4. forum and will be installing in my live forums. Works like a champ too!

I had to make the following changes to the loo_sql_searchplug.php though. (Please note) I'm not the author so I hope it is OK to show how I got it to work, plus I can not support either. Sorry.

Too bad this is not a standard "out-of-the-box" feature for vB.


Original


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

NEW


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Indy
17 Dec 2006, 23:33
Since this will display the same busy message, I also changed my "toobusy" phrase to:

If you tried to perform a search and received this message, then the server load is a little too high to complete your request at this time.

If you were not conducting a search, then the server load has reached a critical point and needs to unload. Please try again in a few minutes.

I would have to track down fetching of the error code to display a different message solely for this hack, but I think I may leave things as they are. (Is it worth the time figuring it out just to have a separate message????)

Cybershaolin
18 Dec 2006, 04:46
Well, many people asked the question but I never saw any answer yet.

What value do you put in the server load settings? Let say I just want to test if it's working, what would be the value for that and what would be the regular value to use in overload charge?

Indy
18 Dec 2006, 17:47
What I did was to enter a value less than the actual server load at the time in my dev forum. My server was running about .8 so I typed in .2 Then I tried to do a search in my test forum and was given the error message. Since I had the admin screen opened in another window, I would type in a setting higher than actual load and I was able to search. Once I determined everything was working properly, I installed it in my live forums.

In my live forums I have high NIX load set at 5 and disable searches set at 2.0

Cybershaolin
18 Dec 2006, 19:08
Thanks for the tip. Just one more question, where can you see the actual server load? You said you saw yours at .8, how do you see that, do you mean the value in our cpanel, plesk or whatever...?

Indy
18 Dec 2006, 20:28
Just Telnet in and do a "top" command. If you can't do this because of being on a shared server, etc. then I suppose the only way would be to see what a snapshot of the current load is when you first load your admincp.

vissa
24 Feb 2007, 09:16
I made the changes Indy suggested and it did work with 3.6.4 (with some minor server tweaks).

WARNING: At first I thought this wasn't working but it turns out you need to allow access to the /proc directory with php. If you have" php open_basedir Security" enabled, you will need to disable it for your forum/domain in order to get this to work. It will probably only work if you own your own server as hosts may not allow this. Disabling this security protection for your domain is a slight security risk if your domain gets hacked or is vulnerable. There should be another way to have a mod like this that doesn't need access to /proc.

-vissa

Hornstar
23 Jul 2007, 05:41
Is a shame this is not supported/default/extended apart from that, it is very nice. thanks.