vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Close Search during high server load (https://vborg.vbsupport.ru/showthread.php?t=82628)

Brad 06-06-2005 10:00 PM

Close Search during high server load
 
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 06-17-2005 08:19 PM

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 06-17-2005 08:22 PM

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 06-17-2005 08:35 PM

Quote:

Originally Posted by KirbyDE
The queries are only necessary once to create the new Setting and the Phrases for this setting.

No idea what this means...

Quote:

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

Thanks.

Andreas 06-17-2005 08:40 PM

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 06-17-2005 09:39 PM

Ah, ok, thanks a lot.

Christine 06-23-2005 12:54 AM

Thanks for porting this!

Brad 06-27-2005 06:18 AM

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 06-27-2005 08:27 AM

Quote:

Originally Posted by Brad.loo
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 06-27-2005 09:30 AM

Fixed the type in your thread title Brad ;)

MPDev 06-28-2005 06:04 PM

Nice, I did this for 3.0 here.

peterska2 07-23-2005 04:45 PM

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 07-23-2005 05:15 PM

Quote:

Originally Posted by peterska2
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 07-23-2005 05:29 PM

Apart from that one little thing it ran smoothly. Nothing to worry about for you there.

vibe 10-10-2005 01:43 AM

installed!

lazytown 12-06-2005 08:24 AM

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 12-08-2005 07:08 PM

powerful hack
installed

AWI 12-09-2005 06:12 AM

Installed this, where exactly do I go to set the load limit? Thanks

kommuni 12-16-2005 11:21 PM

Quote:

Originally Posted by AWI
Installed this, where exactly do I go to set the load limit? Thanks

also can't find it under the serversettings :(

HeRCuL70 12-17-2005 07:05 PM

sorry, is this hack working with windows 2003? It seems for lunix server. doesnt it?

lazytown 12-21-2005 11:57 PM

What's the difference between this mod and the other one here
https://vborg.vbsupport.ru/showthrea...ht=search+load

-vissa

bada_bing 01-11-2006 07:02 PM

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 02-03-2006 02:55 PM

Can someone answer my questions please

bada_bing 02-07-2006 02:23 AM

Nice hack to bad there is no support..

MissKalunji 02-23-2006 04:50 AM

installed will be testing soon

MissKalunji 02-23-2006 05:02 AM

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 02-23-2006 07:24 AM

This looks like a very useful plugin thanks. :D

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

beano33 02-24-2006 08:29 PM

Quote:

Originally Posted by JamesFrost
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 03-28-2006 09:40 AM

I would like not to disable search forums in busy times, but increase the time between search queries.

Snake 03-28-2006 12:06 PM

Awesome, I find this very useful!

DementedMindz 04-16-2006 02:59 AM

question is how do we remove it? if we no longer want it?

vBB-vietnam 04-16-2006 08:00 AM

Is it only active with Linux Server ?

Bieddos 05-05-2006 08:25 AM

sorry but... where i can set the limit for search nix load???

Bieddos 05-09-2006 12:39 PM

Quote:

Originally Posted by Bieddos
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 06-22-2006 03:43 PM

ok brad ill ask again... how do we remove it? if we no longer want it?

zooman 07-02-2006 11:57 AM

anyone tested on 3.6

Ghanem 09-01-2006 06:45 PM

Quote:

Originally Posted by zooman
anyone tested on 3.6

Any one please :)

Cybershaolin 12-12-2006 12:47 AM

Does it work with 3.6.4?

Indy 12-17-2006 10:22 PM

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
PHP Code:

// add phrases to master set
$db->query_write("INSERT INTO " TABLE_PREFIX "phrase (languageid, phrasetypeid, varname, text) VALUES ('-1', '5000', 'setting_searchloolimit_desc', 'Just like the *NIX load limit setting, but only prevents access to searching when the server load is too high')");

$db->query_write("INSERT INTO " TABLE_PREFIX "phrase (languageid, phrasetypeid, varname, text) VALUES ('-1', '5000', 'setting_searchloolimit_title', 'Search Server Load Limit')"); 

NEW
PHP Code:

$db->query_write("INSERT INTO " TABLE_PREFIX "phrase (languageid, phraseid, varname, text, product, fieldname) VALUES ('-1', '5000', 'setting_searchloolimit_desc', 'Just like the *NIX load limit setting, but only prevents access to searching when the server load is to high', 'vbulletin', 'vbsettings')");

$db->query_write("INSERT INTO " TABLE_PREFIX "phrase (languageid, phraseid, varname, text, product, fieldname) VALUES ('-1', '5001', 'setting_searchloolimit_title', 'Search Server Load Limit', 'vbulletin', 'vbsettings')"); 


Indy 12-17-2006 10:33 PM

Since this will display the same busy message, I also changed my "toobusy" phrase to:

Quote:

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????)


All times are GMT. The time now is 06:40 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01508 seconds
  • Memory Usage 1,800KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete