Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Suppress-o-matic - Stop database error spam Details »»
Suppress-o-matic - Stop database error spam
Version: 1.0.0, by GeekyDesigns GeekyDesigns is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 4.x.x Rating:
Released: 11-16-2009 Last Update: Never Installs: 85
Code Changes Additional Files  
No support by the author.

What is Suppress-o-matic?
Suppress-o-matic is a change to the way vBulletin handles database error emails. It limits sending the same error email repeatedly to your inbox every time a database error is generated. On a busy site if a table is crashed or mysql itself goes down you could recieve several thousand emails. This causes the email server to bog down, and possibly the server itself if there is enough traffic generating emails.

Why do I want Suppress-o-matic?
It should be pretty clear, you still get the vital information that your vBulletin forum is offline for whichever reason, without the hassle of having to delete and manage your inbox afterwords.

Why do I have to edit the files?
If the database is down, there is no way to get to the plugins. Plugins are stored in the vBulletin database.

Isn't there a vBulletin Option for this?
There is an option to disable some emails, assuming that the settings table can be read. If it cannot then it doesn't work. It even states this on the option itself.

Can't I just remove my tech email from the config file?
This doesn't keep you up to date. What if a serious error like error 28 (no space left) crops up? This means that your server could potentially have serious issues. Not resolving these problems could cause major issues.

Are you considering adding more functionality to Suppress-o-matic?
We have plans to add a repair feature at some point in time, with an on/off switch.

What is SQlite?
SQLite is a tiny database engine that is found in PHP. It is very lite, and requires only that php have the extension. There is no other dedicated server for it. You can find more information here: http://en.wikipedia.org/wiki/SQLite


Whats required?
PHP5
SQLITE2 or newer (found in most php installations)
1 file edit
1 file to upload

Future versions:
Repair table feature



Project Credits:
Zachery - Project Planning, design goals, pestering.
Link14716 - Hard work.

This works for vBulletin 4.0 as well as 3.7+. vB3 thread located here.

Download Now

File Type: zip DB Error Suppress-o-matic.zip (1.7 KB, 440 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
Teascu Dorin

Comments
  #52  
Old 07-07-2015, 02:21 PM
kerrghann's Avatar
kerrghann kerrghann is offline
 
Join Date: Jul 2012
Location: Hawaii
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This seems to be exactly what I want. I'll give it a go. Thanks for the mod.
Reply With Quote
Благодарность от:
Zachery
  #53  
Old 12-28-2015, 07:29 PM
joyboy2001 joyboy2001 is offline
 
Join Date: Nov 2008
Location: New Delhi, India
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this working with 4.2.x ?
Reply With Quote
  #54  
Old 01-01-2016, 03:26 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still works fine.
Reply With Quote
  #55  
Old 07-23-2016, 03:15 AM
Islamic Board Islamic Board is offline
 
Join Date: May 2016
Location: www.IslamicBoard.com
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We have SQLite3 installed on php 5.4 and this mod doesn't work. How can we modify this to work with SQLite3?
Reply With Quote
  #56  
Old 07-26-2016, 07:32 AM
AusPhotography's Avatar
AusPhotography AusPhotography is offline
 
Join Date: Nov 2007
Location: Hobart & Adelaide .au
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

SQLite3 requires recoding the plugin slightly.
I've done it - easy

Kym
Reply With Quote
  #57  
Old 07-26-2016, 09:40 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you have the errors or notes regarding it? I don't have a test bed for this right now but if you let me know we can look into fixing it.
Reply With Quote
  #58  
Old 07-27-2016, 06:49 PM
Islamic Board Islamic Board is offline
 
Join Date: May 2016
Location: www.IslamicBoard.com
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery View Post
Do you have the errors or notes regarding it? I don't have a test bed for this right now but if you let me know we can look into fixing it.
We have modified it slightly to work with SQLite3. There doesn't seem to be any errors thrown by this script at the moment but when we tested it, we still receive multiple db error emails of the same error message, even within 1 second.

Below is the modified script for SQLite3.
Code:
/**********************************************\ 
|* DB Error Mail Suppressomatic (squall14716) *|
\**********************************************/
if ($sqlitedb = new SQLite3(DIR.'/sqlite3dberrors.sqlite', 0666, $sqliteerror)) {
    // Time between errors. 1800 (30 minutes) by default.
    // Modify config.php for easy changing of this. For example:
    // $config['dbems']['timebetweenerrors'] = 1800;
    //($vbulletin->config['dbems']['timebetweenerrors'] ? $timebetweenerrors = $vbulletin->config['dbems']['timebetweenerrors'] : $timebetweenerrors = 60);
    $timebetweenerrors = 60; // seconds

    // Database opened and ready. Let's check to see if there are recent errors of this type.
    $sqlitequery = $sqlitedb->query("SELECT * FROM dberrors WHERE time > ".(TIMENOW - $timebetweenerrors).
        " AND errorcode = '".$this->errno."' ORDER BY time DESC");
    $suppresserrormail = false;
    while ($sqliteresult = $sqlitequery->fetchArray(SQLITE3_ASSOC)) {
        if ($sqliteresult['script'] == $scriptpath) {
            if ($sqliteresult['errorcode'] == $this->errno) {
                // Script is the same and the errorcode is the same. Let's supress this error e-mail.
                $suppresserrormail = true;
            }
        }
        if ($sqliteresult['error'] == $this->error) {
            // Error message is the same. Supress this error e-mail.
            $suppresserrormail = true;
        }
    }

    if ($suppresserrormail == false) {
        $sqlitedb->exec("INSERT INTO dberrors (time, error, errorcode, ipaddress, script) VALUES (".TIMENOW.
            ", '".SQLite3::escapeString($this->error)."', '".$this->errno."', '$ipaddress', '$scriptpath')");
    } else {
        $technicalemail = "";
    }

    // Clean the SQLite table of all irrelevant data.
    $sqlitedb->exec("DELETE FROM dberrors WHERE time < ".(TIMENOW - $timebetweenerrors));

}
/**************************************************\ 
|* End DB Error Mail Suppressomatic (squall14716) *|
\**************************************************/

Using the dumpdberror script given in this thread, we can see that there was a single db error written in the database file, only once. It has not updated after that in subsequent tests.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:08 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04493 seconds
  • Memory Usage 2,310KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (8)post_thanks_box
  • (2)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (1)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete