Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Anguz on November 05, 2004, 07:08:28 AM

Title: Fuse Box
Post by: Anguz on November 05, 2004, 07:08:28 AM
Link to Mod (http://mods.simplemachines.org/index.php?mod=43)

This mod will add a "fuse Box" to your forum settings to prevent further overload when the server is under stress. It provides 5 fuses which will "blow" when the server load is over the limit you set for each one. They will put the forum in Maintenance Mode, disable the search feature, disable the "all" for unread messages, disable the Statistics Center, and/or disable the Auto Optimize Database feature. You can use all the fuses or just some and each one can have a different server load limit. The mod will also automatically replace your blown fuses when the load goes back down. ;)

Copyright 2004 by Cristian Lavaque. http://anguz.net
Title: Re: Fuse Box
Post by: Ben_S on November 05, 2004, 11:01:14 AM
Nice mod, would be even better if you added the option to disable more stats too as that can be a killer.
Title: Re: Fuse Box
Post by: Anguz on November 05, 2004, 04:18:11 PM
Really? Didn't know. I'll look into it and add it. It's a big box, can hold many fuses. ;)
Title: Re: Fuse Box
Post by: Anguz on November 05, 2004, 06:03:49 PM
You mean action=stats, right?
Title: Re: Fuse Box
Post by: Ben_S on November 05, 2004, 08:13:16 PM
Quote from: Anguz on November 05, 2004, 06:03:49 PM
You mean action=stats, right?

Thats the one, with only 100 or so users online it only takes about 4 seconds on my board but when the loads high  it can take an age and watching top when you click it you can see the load shoot up.
Title: Re: Fuse Box
Post by: Anguz on November 06, 2004, 05:17:41 AM
Updated to 1.10

Title: Re: Fuse Box
Post by: Ben_S on November 06, 2004, 06:21:06 AM
Thanks, will install this tomorrow. :).
Title: Re: Fuse Box
Post by: Anguz on November 06, 2004, 06:23:43 AM
Quote from: Ben_S on November 06, 2004, 06:21:06 AM
Thanks, will install this tomorrow. :).

My pleasure. ;)

After installing, go to your forum settings and set the max loads for each fuse to what's best for you.
Title: Re: Fuse Box
Post by: Jerry on November 06, 2004, 06:59:49 AM
this is a gr8 mod, but the on the admin Features\settings for the Fuse Box is kind of unclear.
Title: Re: Fuse Box
Post by: Anguz on November 06, 2004, 06:14:30 PM
Click on the (http://www.simplemachines.org/community/Themes/default/images/helptopics.gif) icon to get information on each item in the Fuse Box settings. :)
Title: Re: Fuse Box
Post by: Jerry on November 06, 2004, 09:22:48 PM
forgot all about those question mark icons :) thanks
Title: Re: Fuse Box
Post by: Ben_S on November 07, 2004, 11:33:26 AM
Installed fine, will get a proper test tomorrow :).

Thanks
Title: Re: Fuse Box
Post by: Anguz on November 07, 2004, 02:17:42 PM
Great. :)
Title: Re: Fuse Box
Post by: Ben_S on November 08, 2004, 12:40:33 PM
Board has been fine today, not sure if it's because of this or the many changes I made to mysql & apache. Still am very happy to have this as a safegaurd against people hamering search etc to bring the site down.
Title: Re: Fuse Box
Post by: Anguz on November 10, 2004, 05:16:41 AM
Updated to 1.20

Title: Re: Fuse Box
Post by: Ben_S on November 10, 2004, 07:42:12 AM
Wil update tonight, in the meantime a few suggestions, not sure how usefull they would be to people but how about an option to reduce the number of posts per page, topics per page depending on load?
Title: Re: Fuse Box
Post by: Tony Reid on November 10, 2004, 08:13:44 AM
Hey I was just gonna update my feature request....

http://www.simplemachines.org/community/index.php?topic=19159.0

Looks like I dont have to ;D

Thanks Anguz!
Title: Re: Fuse Box
Post by: Anguz on November 10, 2004, 04:51:24 PM
Quote from: Ben_S on November 10, 2004, 07:42:12 AM
Wil update tonight, in the meantime a few suggestions, not sure how usefull they would be to people but how about an option to reduce the number of posts per page, topics per page depending on load?

I don't know, you mean like not being as extreme as putting the forum in Maintenance Mode and just disable posting? Well, I could disable it and make the forum read-only under a certain ammount of load, but that wouldn't lighten it much, would it? I don't know.

I'd like to get more feedback on heavy loading actions by SMF in the other topic I started in the coding discussion board (http://www.simplemachines.org/community/index.php?topic=19420.0) on it, so if you could voice your ideas there and we get some more feedback by others, we may find more good fuses to add.

On the update, I didn't write an updater, so just uninstall the one you have and then install this new version. :)
Title: Re: Fuse Box
Post by: Anguz on November 10, 2004, 04:53:59 PM
Quote from: Tony on November 10, 2004, 08:13:44 AM
Hey I was just gonna update my feature request....

http://www.simplemachines.org/community/index.php?topic=19159.0

Looks like I dont have to ;D

Thanks Anguz!

You're welcome! ;)

Thank [Unknown] for telling me about it too! :)
Title: Re: Fuse Box
Post by: [Unknown] on November 10, 2004, 05:10:00 PM
Quote from: Anguz on November 10, 2004, 04:51:24 PM
On the update, I didn't write an updater, so just uninstall the one you have and then install this new version. :)

If you just include the old mod file and uninstall it in the install section, you're doing that step for them, no?

-[Unknown]
Title: Re: Fuse Box
Post by: Anguz on November 10, 2004, 06:00:53 PM
Quote from: [Unknown] on November 10, 2004, 05:10:00 PM
If you just include the old mod file and uninstall it in the install section, you're doing that step for them, no?

-[Unknown]

Oh! I had not thought of that! Great tip! Thank you very much. :)

My next updates will have this. ;)
Title: Re: Fuse Box
Post by: Ben_S on November 10, 2004, 07:08:53 PM
Quote from: Anguz on November 10, 2004, 04:51:24 PM
I don't know, you mean like not being as extreme as putting the forum in Maintenance Mode and just disable posting? Well, I could disable it and make the forum read-only under a certain ammount of load, but that wouldn't lighten it much, would it? I don't know.

I was thinking along the lines of reducing the setting for the number of posts per page displayed in a topic automatically so that if the board is set to display 40 posts per page, if the load goes above what the admin sets, instead of displaying 40 posts, it only displays 20 or whatever the admin sets it to.

Not sure how useful it would be, I know in the past when certain big events have happened, I've reduced it manually for a few hours although whether it helped the site stay up is debatable.

QuoteI'd like to get more feedback on heavy loading actions by SMF in the other topic I started in the coding discussion board (http://www.simplemachines.org/community/index.php?topic=19420.0) on it, so if you could voice your ideas there and we get some more feedback by others, we may find more good fuses to add.

The only ones I can think of are those already done, whos online used to be a problem but not anymore now it has pagination.

ps great mod, only one I have installed as yet, although I am planning on adding your faster parse code too.
Title: Re: Fuse Box
Post by: Anguz on November 10, 2004, 08:46:35 PM
That doesn't sound like a bad idea, although I also don't know how much it helps the server to do it. I do think I could unset ;all for any action and not just unread, in case the load goes over a certain point.

I am really glad you found it useful! This was [Unknown]'s idea. If you have anything you think could be a good mod, let me know and we'll talk it over. ;)
Title: Re: Fuse Box
Post by: Anguz on November 11, 2004, 05:55:39 AM
Updated to 1.21


I haven't figured out how to make the upgrade work in package-info.xml yet, so you'll have to uninstall the previous and install this one.

Sorry for updating again so soon, but it was important. :-\
Title: Re: Fuse Box
Post by: Pause on November 11, 2004, 06:55:40 AM
Downloaded it fine, but when I try to upload it to the board:

QuoteThe package you tried to upload either is not a valid package or has become corrupted.

The 1.10 version installed fine, but it has the above error with both 1.20 and 1.21 (I went for 1.21 but that did it first, so that's why I then tried 1.20)
Title: Re: Fuse Box
Post by: Anguz on November 11, 2004, 08:57:37 AM
I just downloaded them from the here and the files were fine. Why don't you try downloading them again?

And, yes, 1.21 is the one you should get.
Title: Re: Fuse Box
Post by: Pause on November 12, 2004, 06:26:23 AM
Downloaded fine, but when I tried to upload, I got the same error...

QuoteAn Error Has Occurred!   

The package you tried to upload either is not a valid package or has become corrupted.

[EDIT: It's OK, I downloaded it via Internet Explorer this time, and now it's done it :D]
Title: Re: Fuse Box
Post by: Anguz on November 12, 2004, 06:34:31 AM
Cool. :)
Title: Re: Fuse Box
Post by: Anguz on November 13, 2004, 06:50:42 PM
Updated to 1.22

Title: Re: Fuse Box
Post by: Ben_S on November 15, 2004, 04:33:40 AM
Works fine on preview with a couple of changes, one to the install for tag and one for the search part for the modifications.english.php
Title: Re: Fuse Box
Post by: Anguz on November 15, 2004, 04:42:16 AM
Cool, thanks for letting us know. :)
Title: Re: Fuse Box
Post by: Ben_S on November 15, 2004, 06:52:30 PM
No problem, thanks for writing it.
Title: Re: Fuse Box
Post by: Tony Reid on November 16, 2004, 06:19:07 AM
This is a fantastic mod and its working well on my site(RC2)  - thank you!
Title: Re: Fuse Box
Post by: Tony Reid on November 19, 2004, 06:14:51 PM
I *think* I have ran into a problem using it with the coppermine bridge.... suddenly my gallery stopped working I turned off the fuse mod and then the gallery started working again.......

Ive looked and the error doesnt make much sense to me, but if you get the chance perhaps you could help point out if its something obvious :) to me it looks like its getting caught on a rem statement  ???

Quote
Fatal error: Call to undefined function: blownfuse() in /home/fertilit/public_html/gallery/bridge/smf.inc.php(125) : eval()'d code on line 20

I am using the latest coppermine install 1.3.2 and the bridge file (although its 1.3.1 bridge) its worked fine up until now :(

To view a text file version of the of the smf.inc.php bridge file check here  : http://www.absolutebreeze.co.uk/smf.inc.txt
Title: Re: Fuse Box
Post by: Anguz on November 19, 2004, 08:56:58 PM
Try this


<edit file>
smf.inc.php
</edit file>

<search for>
cm_include_smf_funcs("$sourcedir/Subs.php", array("updateMemberData", "updateStats", "updateSettings"));
</search for>

<replace>
cm_include_smf_funcs("$sourcedir/Subs.php", array("updateMemberData", "updateStats", "updateSettings", "blownFuse"));
</replace>


HIH.
Title: Re: Fuse Box
Post by: Ben_S on December 01, 2004, 07:42:22 PM
Quote from: Ben_S on November 10, 2004, 07:08:53 PM
I was thinking along the lines of reducing the setting for the number of posts per page displayed in a topic automatically so that if the board is set to display 40 posts per page, if the load goes above what the admin sets, instead of displaying 40 posts, it only displays 20 or whatever the admin sets it to.

Have just discovered I could maybe really do with something like that, Match just finnished cue about 100 people all clicking stuff in a 5 second period and load flying up. Not sure how much difference it would make to resource useage, but fetcing less data should reduce it a fair bit I would have though.
Title: Re: Fuse Box
Post by: Anguz on December 02, 2004, 04:12:37 PM
Hmm... so you got the forum put in maintenance after the match because of the high load?

What do you suggest? less topics in messageindex and replies in display?
Title: Re: Fuse Box
Post by: Ben_S on December 02, 2004, 05:48:05 PM
Yep, am option for less topics and replies to be shown would be good. Not sure how much difference it would make but it's bound to make some.
Title: Re: Fuse Box
Post by: MatrixRev on December 06, 2004, 07:53:03 PM
Excellent mod just added it my webhost forums yet to see it get overkilled though lol so if it happens id like to see it kick into action
Title: Re: Fuse Box
Post by: Anguz on December 06, 2004, 11:06:08 PM
Quote from: MatrixRev on December 06, 2004, 07:53:03 PM
Excellent mod just added it my webhost forums yet to see it get overkilled though lol so if it happens id like to see it kick into action

Thanks. For a test, you can set the load limit really low, to a level where the fuse will blow easily.
Title: Re: Fuse Box
Post by: MatrixRev on December 07, 2004, 12:28:52 AM
ah yea i was thinking about doing that lol just to have a lil tease with it all lol..


Doesn't wanna work with mine lol lowered it to 0.1 still didn't kick in lol. Websites run being a P4 3.40GHz machine so yea a little more would have to kill the forums temproaraly lol
Title: Re: Fuse Box
Post by: Anguz on December 07, 2004, 01:25:16 AM
What version of the mod did you install and what fuse did you set to 0.1?
Title: Re: Fuse Box
Post by: MatrixRev on December 07, 2004, 01:27:52 AM
v1.22 or so says the zip file lol..

I set all fields to 0.1 nothing happend lol
Title: Re: Fuse Box
Post by: Anguz on December 07, 2004, 03:31:39 AM
Are you on a Unix/Linux server? It won't work in Windows.

Are you logged in as an admin when you do the test? It's not very obvious if you are, cause you can browse the forum even if it's in Maintenance Mode.
Title: Re: Fuse Box
Post by: MatrixRev on December 07, 2004, 03:42:05 AM
Yes it's all running under Solaris from what my understanding is.

After i set it i logged out and did a bit of a test
Title: Re: Fuse Box
Post by: Jerry on December 07, 2004, 03:50:13 AM
Quote from: Anguz on December 07, 2004, 03:31:39 AMIt won't work in Windows.
Worked just fine on the windows server I was on ::)
Title: Re: Fuse Box
Post by: Anguz on December 07, 2004, 06:59:54 AM
Quote from: Jerry on December 07, 2004, 03:50:13 AM
Worked just fine on the windows server I was on ::)

Oh great! I was under the impression that it wouldn't.  Thanks for confirming that. How do you know it worked, though? Just curious, cause I really thought it doesn't in Windows.
Title: Re: Fuse Box
Post by: MatrixRev on December 07, 2004, 07:06:22 AM
HeHe well it looks like it works because mysql was running a bit high and it killed everything lol
Title: Re: Fuse Box
Post by: Anguz on December 07, 2004, 08:16:54 AM
Quote from: MatrixRev on December 07, 2004, 07:06:22 AM
HeHe well it looks like it works because mysql was running a bit high and it killed everything lol

Good. :)
Title: Re: Fuse Box
Post by: MatrixRev on December 07, 2004, 08:20:41 AM
It really annoy's me when people take all the power gets on ma friggin nerves
Title: Re: Fuse Box
Post by: Jerry on December 07, 2004, 10:14:28 AM
Quote from: Anguz on December 07, 2004, 06:59:54 AM
Quote from: Jerry on December 07, 2004, 03:50:13 AM
Worked just fine on the windows server I was on ::)

Oh great! I was under the impression that it wouldn't. Thanks for confirming that. How do you know it worked, though? Just curious, cause I really thought it doesn't in Windows.
Well I was bored so I changed the settings to really low while there was a bunch of people online lol and it went into maintinence mode a couple times for the settings =) got a few complaints about the maitinence mode so I made the settings higher again lol
Title: Re: Fuse Box
Post by: Webby on December 07, 2004, 12:56:16 PM
How can I test it ?  I tried 0.0001 for "forum" and 0 for statistics, but nothing happens ;) ?
Title: Re: Fuse Box
Post by: Jerry on December 07, 2004, 08:57:51 PM
I just set everything to 1 and it seemed the work :-\ not sure. . .
Title: Re: Fuse Box
Post by: Daniel D. on December 07, 2004, 09:03:51 PM
Quote from: Webby on December 07, 2004, 12:56:16 PM
How can I test it ?  I tried 0.0001 for "forum" and 0 for statistics, but nothing happens ;) ?
Hahaha!!
Title: Re: Fuse Box
Post by: Anguz on December 07, 2004, 09:19:45 PM
Quote from: Webby on December 07, 2004, 12:56:16 PM
How can I test it ? I tried 0.0001 for "forum" and 0 for statistics, but nothing happens ;) ?

Perhaps it considers the 0.0001 as 0.0, which actually disables the fuse.
Title: Re: Fuse Box
Post by: Webby on December 08, 2004, 02:04:31 AM
Hahaha, I tried it again and logge out as admin : it works ;) !!
Title: Re: Fuse Box
Post by: Anguz on December 08, 2004, 04:20:27 AM
Quote from: Webby on December 08, 2004, 02:04:31 AM
Hahaha, I tried it again and logge out as admin : it works ;) !!

Ah, good! I was worried for a moment. :)
Title: Re: Fuse Box
Post by: Fizzy on January 02, 2005, 02:40:35 PM
Is this based on "total server load" even on a shared server?

My forum has ceased to function since I installed it.
If it's just my SMF forum that's tripped the fuse then I have some serious problems, I'm set at server load 30 and am still in Maintenance Mode
Title: Re: Fuse Box
Post by: Ben_S on January 02, 2005, 02:45:20 PM
Total server load, there is no way to get a value for an undividual user.
Title: Re: Fuse Box
Post by: Fizzy on January 02, 2005, 02:47:53 PM
Thanks Ben,

I was really hoping to try and find the actually load for my own site on the shared server, I tried using shell with ps -e aux but that didn't help.
My current server seems to be particularly busy

Quote
Server Status


   
   
apache (1.3.33 (Unix))   up   
cppop   up   
cpsrvd   up   
exim (exim-4.43-40_cpanel_smtpctl_av_rewrite_mm2_mmmtrap_exiscan_md5pass)   up   
eximstats   up   
ftpd   up   
imap   up   
mysql (4.0.22-standard)   up   
spamd   up   
syslogd   up   
Server Load   28.03 (1 cpu)   
Memory Used   84.2 %   
Swap   0.623 %   
Disk hda3 (/)   26 %   
Disk hda1 (/boot)   18 %   

Maybe I should ask to be moved to another quieter server at the host.
Title: Re: Fuse Box
Post by: Anguz on January 02, 2005, 05:04:33 PM
Fizzy, sorry for not seeing your posts earlier. What Ben told you is right, the load is for the whole server. That's a pretty busy one you're in. Maybe one of the users in it is abusing it a bit, the host will know what to do.
Title: Re: Fuse Box
Post by: Fizzy on January 02, 2005, 07:41:16 PM
Hey there Anguz old buddy :)

I took the issue up with the server host.  They did report back later to say that a single user was abusing and that the problem had been "sorted".
Since then the cpu load had dropped low again and the forum is no longer tripping out any fuses.

Maybe you should speak to server hosts about your script as it turned out to be a great alert both for me and them :)


Either way, I think this is a great Mod. Very useful.

Thanks for writing it  8)
Title: Re: Fuse Box
Post by: Anguz on January 02, 2005, 08:19:09 PM
Glad you liked it. :D
Title: Re: Fuse Box
Post by: neugi on January 14, 2005, 05:59:16 AM
Hi,

will there be a fuse mod for the 1.0.1?

best
Title: Re: Fuse Box
Post by: Anguz on January 14, 2005, 07:04:35 AM
Quote from: neugi on January 14, 2005, 05:59:16 AM
Hi,

will there be a fuse mod for the 1.0.1?

best

Of course.
Title: Re: Fuse Box
Post by: neugi on January 14, 2005, 08:24:57 AM
Hi,

i've tried it right now on the new 1.0.1 but the fuse box is not visibel. when do you think there will be a version for the 1.0.1?

thx
Title: Re: Fuse Box
Post by: Fizzy on January 15, 2005, 06:19:07 AM
Hi Anguz,

This is a great Mod, thank you for writing it :)

From a user perspective though, I know you have default settings for the different fuses but do you have any guidelines at all?
What I mean is that I have had to increase the "Stats" fuse rating slightly and was wondering if there was any way of guaging what setting should be considered or rated as good/average/bad ?

For example, if I have had to increase my Stats fuse from 2 to 5 should I be worried?
Title: Re: Fuse Box
Post by: Anguz on February 03, 2005, 10:38:31 AM
Version 1.23

Title: Re: Fuse Box
Post by: Anguz on February 03, 2005, 10:43:46 AM
Quote from: Fizzy on January 15, 2005, 06:19:07 AM
Hi Anguz,

This is a great Mod, thank you for writing it :)

From a user perspective though, I know you have default settings for the different fuses but do you have any guidelines at all?
What I mean is that I have had to increase the "Stats" fuse rating slightly and was wondering if there was any way of guaging what setting should be considered or rated as good/average/bad ?

For example, if I have had to increase my Stats fuse from 2 to 5 should I be worried?

Sorry for not noticing your post earlier Fizzy! :o

I really don't know much about that to recommend values. These will vary from server to server. You should monitor your load and decide what values work best for you. I believe that someone with more experience on servers would give better advice on this, though.

I'm sorry I can't be of more help than that. :(
Title: Re: Fuse Box
Post by: neugi on February 03, 2005, 10:54:44 AM
Hi

works perfekt.

thx
Title: Re: Fuse Box
Post by: [Unknown] on February 03, 2005, 03:05:38 PM
Your load averages should, theoretically, be under the number of CPUs you have.  Maybe twice that - higher and I'd be worried indeed.

-[Unknown]
Title: Re: Fuse Box
Post by: Fizzy on February 04, 2005, 08:12:30 AM
No problem :)  Honestly. I know that you and the rest of the team have been really busy and that you would reply when time/workload allowed ;)

I've continued to tweak the settings to try and strike a balance between overload and normal usage by basically making small incremental changes and getting direct feedback from my members to let me know when any of the fuses blow.

I was having a few problems but that was due to being on a shared server with a couple of other sites that were drawing heavy resources from the hardware but after I spotted that I got transferred to another server and my own settings have come down dramatically.

As I said, a great mod, thanks for producing it.
Title: Re: Fuse Box
Post by: neugi on February 04, 2005, 08:19:53 AM
@fizzy

which settings are you using right now. are there any stettings that you would say that are the best to use by default?

best
Title: Re: Fuse Box
Post by: Fizzy on February 04, 2005, 08:32:52 AM
Hi Neugi,

I'm currently using the following:

Forum  30
Search   4
Unread All  2   
Statistics Center   4
Auto Optimize Database   2

The 'Forum' one is gradually being reduced by 2 every few days until I get a good balance and the forum doesn't drop in to Maintenance Mode.
I found that "Search" depends more on the number of posts on your forum so with 150,000 on mine I have set this to 4 and it seems fine at that.
Unread All has never tripped out yet
Stats Center has tripped out a couple of times but that seems to be very stable at 4 now.
Auto Optimize hasn't tripped out yet.

I think a lot depends on who you are sharing a server with. My host was kind enough to move me to a quieter server without any quibbles and that has allowed me to be able to gradually reduce the settings. I'm fairly sure that they can go lower than they are now. I'll post on here what the final optimum settings are for my own forum once I finish the exercise :)
Title: Re: Fuse Box
Post by: Anguz on February 04, 2005, 02:05:10 PM
Thank you for sharing that info. It's great that your host was so helpful. I'm glad you like the mod.

It's actually pretty not obvious, there's not message mentioning overload, it'll just work as Unread. About the UnreadAll fuse, how do you know it hasn't blown yet?
Title: Re: Fuse Box
Post by: [Unknown] on February 04, 2005, 04:00:09 PM
Fizzy, can you try setting your log_topics, log_mark_read, attachments, topics, log_search, and log_boards tables to InnoDB in the Operations tab under phpMyAdmin?

-[Unknown]
Title: Re: Fuse Box
Post by: Fizzy on February 05, 2005, 05:24:14 AM
Quote from: Anguz on February 04, 2005, 02:05:10 PM
About the UnreadAll fuse, how do you know it hasn't blown yet?

Forthunately I have a great bunch of members who provide me with a lot of feedback. Since we converted over to SMF they have been really helpful in giving me all information regarding anything that didn't seem to be working properly or even seemed "different"
I can't be 100% sure, but I haven't had any reports of it blowing yet  ;)


Quote from: [Unknown] on February 04, 2005, 04:00:09 PM
Fizzy, can you try setting your log_topics, log_mark_read, attachments, topics, log_search, and log_boards tables to InnoDB in the Operations tab under phpMyAdmin?

-[Unknown]

I'll gladly give it a try and feed back :)
Is there anything in particular you would like me to look for when I make the change? (after I've done a back-up to be safe :) )
Title: Re: Fuse Box
Post by: [Unknown] on February 05, 2005, 05:32:42 AM
It should make searching, among other things, faster... hopefully.  Your forum is a bit small for it.

-[Unknown]
Title: Re: Fuse Box
Post by: Fizzy on February 05, 2005, 05:35:53 AM
Ok , no problem :)

I'll record a comparison on page creation times on some standard searches ~ before and after  :)
Title: Re: Fuse Box
Post by: Fizzy on February 05, 2005, 05:59:47 AM
Pre DB changes

Search parameters = Search all boards, all categories, 9999 days

Results
Search word - number of pages in result - creation times
"various" 18 pages - Page created in 19.422 seconds with 25 queries.
"timing" 4 pages - Page created in 14.755 seconds with 23 queries.
"frog" 2 pages - Page created in 13.075 seconds with 27 queries.
"festival" 2 pages - Page created in 18.793 seconds with 23 queries.
"disorder" 18 pages - Page created in 21.74 seconds with 23 queries.


After conversion to InnoDB

various - Page created in 17.776 seconds with 25 queries.
timing - Page created in 16.256 seconds with 25 queries.
frog - " Sorry, the search functionality has been temporarily disabled due to high stress on the server. Please try again later."
festival - Page created in 18.899 seconds with 26 queries.
disorder - Page created in 19.826 seconds with 24 queries.
Title: Re: Fuse Box
Post by: [Unknown] on February 05, 2005, 06:03:38 AM
It may or may not have immediate effect, especially because usage could differ between tests.

Basically, it *should* make searches which return many results faster.

-[Unknown]
Title: Re: Fuse Box
Post by: Fizzy on February 05, 2005, 06:06:02 AM
OK, no problem.

I'll revisit it from time to time and see how it progresses ;)
Title: Re: Fuse Box
Post by: Anguz on February 24, 2005, 05:46:41 AM
1.24

Title: Re: Fuse Box
Post by: Col on March 05, 2005, 12:35:17 PM
This sounds interesting. I'm having problems and am probably transfering to SMF soon. Does this mod not log when fuses are blown? - Or have I missed something? A log would help a lot I think.
Title: Re: Fuse Box
Post by: Anguz on March 05, 2005, 01:34:26 PM
It currently doesn't log, but it could be implemented.
Title: Re: Fuse Box
Post by: Fizzy on March 05, 2005, 04:14:36 PM
Quote from: Anguz on March 05, 2005, 01:34:26 PM
It currently doesn't log, but it could be implemented.

That would be a bonus Anguz :)
Title: Re: Fuse Box
Post by: Anguz on March 05, 2005, 04:42:23 PM
Quote from: Fizzy on March 05, 2005, 04:14:36 PM
That would be a bonus Anguz :)

Okay. I will implement it in the next version. ;)

No dates, though. I'm currently pretty busy hacking SMF to death with themes and mods, for a project I have going. So, I may add the logging soon or not, but it's there in the to-do now. :P
Title: Re: Fuse Box
Post by: Fizzy on March 05, 2005, 04:49:31 PM
That's fine by me Anguz :)

Your "To-do" 's are always well worth waiting for :)
Title: Re: Fuse Box
Post by: Surfy on March 12, 2005, 07:50:57 AM

Seems to be a great Mod - thanks!

But i doesnt understand, how the Mod see, when the server is overloadet..

How do you get that, or how know the Mod that?
Title: Re: Fuse Box
Post by: Anguz on March 12, 2005, 03:56:39 PM
Look at the blownFuse function in Subs.php. :)
Title: Re: Fuse Box
Post by: boogiedown on March 30, 2005, 03:29:31 PM
is there an update for smf 1.0.3?
Title: Re: Fuse Box
Post by: Anguz on March 30, 2005, 04:22:58 PM
Not yet.
Title: Re: Fuse Box
Post by: Col on March 30, 2005, 04:42:59 PM
Don't forget to include the logging function!  ;D  :D
Title: Re: Fuse Box
Post by: Col on April 03, 2005, 02:18:05 PM
Hi,

Just installed this on a test forum v1.0.3. I have only installed the shoutbox before this mod, and am using the default theme.

There is no Apply Mod option in the package manager, and wondered if some mods auto-instal, but it's not in Layout & Options.

What am I missing?

Thanks.
Title: Re: Fuse Box
Post by: Anguz on April 03, 2005, 10:47:57 PM
Installed or just uploaded? This package won't give you the Apply Mod link cause it hasn't been updated for SMF 1.0.3 yet.
Title: Re: Fuse Box
Post by: Col on April 04, 2005, 08:19:21 AM
Sorry, yes, just uploaded. Of course, didn't think about the upgrade to 1.0.3. Is it compatable with 1.0.3? What I mean is can I install it to 1.0.2 and then then upgrade to to 1.0.3?

Thanks.
Title: Re: Fuse Box
Post by: Anguz on April 04, 2005, 10:51:26 PM
Don't know. Haven't tried it myself.
Title: Re: Fuse Box
Post by: boogiedown on April 19, 2005, 02:15:43 PM
whos gonna fix this?
Title: Re: Fuse Box
Post by: duconihilum on May 02, 2005, 05:03:27 PM
when will this be updated?
Title: Re: Fuse Box
Post by: Cerberus on May 29, 2005, 05:38:41 AM
Anguz, the file on the mods package server is an empty archive :(
Have you updated it to 1.0.3 and 1.1?
Title: Re: Fuse Box
Post by: Anguz on May 29, 2005, 07:02:38 AM
Haven't updated yet, but I plan to, soon, at least 1.0.3. I'll fix the 1.0.2 in the meantime, thanks for telling me.

Edit: Weird, it worked fine for me, I just downloaded FuseBox124.tar.gz and checked, everything's there.
Title: Re: Fuse Box
Post by: Cerberus on May 29, 2005, 08:16:05 AM
Yupp, the file works now :)
I'm looking forward for the 1.0.3 update :)
Title: Re: Fuse Box
Post by: Ben_S on May 31, 2005, 03:28:36 PM
It works fine on 1.0.3, just download it, unzip it, edit the <install for> tag to remove the version number, ie    <install for=""> zip it up, upload and activate it via the package manager.

It also works fine in 1.1 in case anyone needs it.
Title: Re: Fuse Box
Post by: Anguz on June 01, 2005, 05:45:04 AM
Thanks Ben, I'm sorry for not doing this update yet. I want to add the logging, but I haven't even looked into how it's done yet. Been kinda busy with other stuff these weeks. :(
Title: Re: Fuse Box
Post by: Cerberus on June 01, 2005, 09:54:09 AM
Ben, thanks for the info. I'll try to install it :)
Title: Re: Fuse Box
Post by: Fizzy on June 02, 2005, 08:36:50 AM
Ditto for me

Working perfectly on 1.0.3

:)
Title: Re: Fuse Box
Post by: Cerberus on June 18, 2005, 06:34:03 AM
I've installed it, but I don't see any fusebox ???
SMF 1.0.4 :)
Title: Re: Fuse Box
Post by: Anguz on June 18, 2005, 05:18:07 PM
In your forum settings you should have it. If you have your forum language in russian, the strings won't be there, though, cause I only provided the english ones.
Title: Re: Fuse Box
Post by: Fizzy on June 18, 2005, 05:44:56 PM
Fuse Box in 1.0.4 English is working perfectly here 8)
Title: Re: Fuse Box
Post by: Cerberus on June 24, 2005, 06:14:53 PM
Quote from: Anguz on June 18, 2005, 05:18:07 PM
In your forum settings you should have it. If you have your forum language in russian, the strings won't be there, though, cause I only provided the english ones.
Actually I've added all the strings to the Russian modifications lang file. I thought there would be a sort of indicator showing the current load and the maximum allowed ???
Title: Re: Fuse Box
Post by: Anguz on June 24, 2005, 08:24:53 PM
It doesn't show the current load, but it does let you set the max allowed in the forum settings. Here you can see a screenshot.

(http://www.simplemachines.org/community/index.php?action=dlattach;topic=19379.0;attach=3068;image)
Title: Re: Fuse Box
Post by: Cerberus on June 25, 2005, 11:45:02 AM
I have these settings :)
BTW It would be nice to show the current load somewhere ;) (maybe just for admins or mods)
Title: Re: Fuse Box
Post by: dtm.exe on June 25, 2005, 11:45:52 AM
Quote from: Cerberus on June 25, 2005, 11:45:02 AM
I have these settings :)
BTW It would be nice to show the current load somewhere ;) (maybe just for admins or mods)

I'd also like to see something like that.

-Dan The Man
Title: Re: Fuse Box
Post by: Anguz on June 25, 2005, 06:11:07 PM
OK.
Title: Re: Fuse Box
Post by: sifirforum.com on June 27, 2005, 02:29:21 PM
Quote from: Anguz on June 24, 2005, 08:24:53 PM
It doesn't show the current load, but it does let you set the max allowed in the forum settings. Here you can see a screenshot.

(http://www.simplemachines.org/community/index.php?action=dlattach;topic=19379.0;attach=3068;image)

what does "forum: 7.00" mean.

if increase "7.00" what happen ?
Title: Re: Fuse Box
Post by: Ben_S on June 27, 2005, 02:33:13 PM
When the load gets to 7, your forum will be disabled untill it falls back down to below 7.
Title: Re: Fuse Box
Post by: sifirforum.com on June 27, 2005, 02:44:43 PM
what is "load" mean ?

..

my forum goes to "maintenance mode" often.

is it realy hack or  ???
Title: Re: Fuse Box
Post by: Tristan Perry on June 27, 2005, 02:47:01 PM
Quote from: leke on June 27, 2005, 02:44:43 PM
what is "load" mean ?
The number represents the strain the server is under.. I'm not sure if the load value is proportional to the CPU usage or anything, although a load above 5 generally isn't too good. The server my site is hosted on is generally on about 0.4.
Title: Re: Fuse Box
Post by: Cerberus on July 03, 2005, 08:35:25 AM
Anguz, I hope that the update for 1.1 B3 will show the current load ;)
Title: Re: Fuse Box
Post by: Anguz on July 03, 2005, 09:16:37 AM
Quote from: Cerberus on July 03, 2005, 08:35:25 AM
Anguz, I hope that the update for 1.1 B3 will show the current load ;)

I don't know if I'll be updating my mods for 1.1x yet, I've had trouble finding the time to do it for 1.0x already! :-\

For this mod I plan to add fuse blow logging. If I add showing the load, where should I do it?
Title: Re: Fuse Box
Post by: Cerberus on July 03, 2005, 10:29:59 AM
Quote from: Anguz on July 03, 2005, 09:16:37 AM
I don't know if I'll be updating my mods for 1.1x yet, I've had trouble finding the time to do it for 1.0x already! :-\
Well, it would be nice, as many of us have already upgraded to 1.1x :)
Quote
For this mod I plan to add fuse blow logging. If I add showing the load, where should I do it?
I'd propose to add it after the "Page created" ::)
Page created in 0.244 seconds with 19 queries. Current load: 2.03
Title: Re: Fuse Box
Post by: Ben_S on July 03, 2005, 11:08:24 AM
Fusebox installs fine on 1.1 but that said 1.1 has similar functionality built in, but currently hidden.

Title: Re: Fuse Box
Post by: boogiedown on August 09, 2005, 04:53:38 PM
I did a search on his but couldnt find anything, i think it would be nice to incorporate on high load, limiting the site to certain member groups. think this a posibility or is there something else out there that does this?
Title: Re: Fuse Box
Post by: Anguz on August 09, 2005, 07:16:58 PM
No, it doesn't discriminate what group the member belongs to. I don't think there's a mod that does it. High load is high load, so it's better for everyone that it comes back down before re-enabling.
Title: Re: Fuse Box
Post by: Enc0der on September 24, 2005, 08:01:43 PM
you have an error in your modification to the Load.php file...

Replace:
// Fuse Box.
if (!empty($modSettings['fuseBox']) && !empty($modSettings['fuseBox_autoOptDb']) && blownFuse('autoOptDatabase'))
return;


With:
// Fuse Box.
if (!empty($modSettings['fuseBox']) && !empty($modSettings['fuseBox_autoOptDb']) && blownFuse('autoOptDb'))
return;



besides that, the current version works great under 1.1 RC1 !
Title: Re: Fuse Box
Post by: Ben_S on September 24, 2005, 08:07:26 PM
1.1 has a fusebox type system built in  http://www.simplemachines.org/community/index.php?topic=16119.msg324914#msg324914
Title: Re: Fuse Box
Post by: ANARCH¥ on September 24, 2005, 11:15:24 PM
(http://www.simplemachines.org/community/index.php?action=dlattach;topic=19379.0;attach=3068;image)

someone can post a good explain for those function ? please, and thx.
Title: Re: Fuse Box
Post by: Anguz on September 24, 2005, 11:57:36 PM
Those are the load levels where the fuses will blow. You can change them to what you find best. After the load comes back below that level, the function is available again.
Title: Re: Fuse Box
Post by: ANARCH¥ on September 25, 2005, 07:19:34 PM
thx a lot for ur answer Anguz, but 7.00 ... what is it exactly ... load of  7 pages , 7 what ?
sry if my question look dumb ...  :(
Title: Re: Fuse Box
Post by: Anguz on September 26, 2005, 01:18:29 AM
No, that's the load on the server's processor.
Title: Re: Fuse Box
Post by: vikman on October 10, 2005, 05:24:07 PM
Not sure if I missed something but it doesn't seem to be compatible with 1.0.5.  Is this true?
Title: Re: Fuse Box
Post by: Fizzy on October 14, 2005, 08:39:37 AM
Hi Vikman

It works fine on my 1.0.5

What sort of problems are you getting with yours?
Title: Re: Fuse Box
Post by: Anguz on October 14, 2005, 01:41:01 PM
Hey Fizzy. I think he missed the db script in the package when putting it back together. I'm posting the updated version for 1.0.5 in a moment.
Title: Re: Fuse Box
Post by: Anguz on October 14, 2005, 01:53:15 PM
1.25

Title: Re: Fuse Box
Post by: mikemotorcade on October 24, 2005, 03:22:13 PM
Umm.. I installed your mod but now every page is completely blank! I can't access my forum at all! What happened?
Title: Re: Fuse Box
Post by: Anguz on October 25, 2005, 12:23:46 AM
You can recover the files going to your FTP, the pre-mod files have a ~ at the end. What SMF version are you using?
Title: Re: Fuse Box
Post by: mikemotorcade on October 25, 2005, 12:28:18 AM
Quote from: Anguz on October 25, 2005, 12:23:46 AM
You can recover the files going to your FTP, the pre-mod files have a ~ at the end. What SMF version are you using?

1.0.5
Title: Re: Fuse Box
Post by: Anguz on October 25, 2005, 01:40:24 PM
Hmm... Was it a clean install?

Has anyone else had a problem with this version? Cause it works for me.
Title: Re: Fuse Box
Post by: mikemotorcade on October 25, 2005, 02:12:13 PM
Quote from: Anguz on October 25, 2005, 01:40:24 PM
Hmm... Was it a clean install?

Has anyone else had a problem with this version? Cause it works for me.

Was what a clean install? SMF? or Fuse Box? When I installed Fuse Box, everything worked fine and when I finished it gave that message: "Fuse Box has been successfully installed.. blah blah or whatever" that it says everytime you install a mod. I don't have any other mods installed so it couldn't be that. When I installed SMF it was clean. I installed 1.0.4 and upgraded to 1.0.5 via an upgrade package that was very similar to a mod. (It installs the same way as a mod.) Could that have made a difference? My site is back up so that problem is fixed, but I don't get Fuse Box. I tried to install it again and the same thing happened and I had to fix it again. I would like to have Fuse Box on my site but I can't install it!  :'(
Title: Re: Fuse Box
Post by: mikemotorcade on October 25, 2005, 02:27:47 PM
Wow, that was weird! I guess I DO have it installed....    ???    I have no idea what happened but everything seems to be working........    Weird...
Title: Re: Fuse Box
Post by: Anguz on October 25, 2005, 05:17:40 PM
Could it be that you installed it twice? Could you check Subs.php and tell me if you have the blownFuse function in it?
Title: Re: Fuse Box
Post by: Elmacik on October 25, 2005, 07:21:20 PM
tempor, i had understood from your last PM, that you rolled back
couldnt you?
Title: Re: Fuse Box
Post by: mikemotorcade on October 26, 2005, 02:24:48 PM
Quote from: Anguz on October 25, 2005, 05:17:40 PM
Could it be that you installed it twice? Could you check Subs.php and tell me if you have the blownFuse function in it?

Quote from: Elmacik on October 25, 2005, 07:21:20 PM
tempor, i had understood from your last PM, that you rolled back
couldnt you?

Yes the blownFuse function is there. I don't think I installed it twice.. After I installed it is when it crashed and then I rolled back and the mod was gone so I installed again and it crashed again and I rolled back again and it was gone again and now suddenly it's there.. ???



By the way, does the mod log every time a fuse is blown? I saw something about that posted earlier but I couldn't figure out if it was ever implemented.
Title: Re: Fuse Box
Post by: Anguz on October 27, 2005, 04:03:20 AM
No, I didn't implement logging.
Title: Re: Fuse Box
Post by: steve in houston on January 10, 2006, 12:49:46 PM
Is there a PHP script I can run on a seperate page that will tell me the server load?
Title: Re: Fuse Box
Post by: Anguz on January 10, 2006, 05:08:12 PM
http://projects.noemics.net/loadavg/
Title: Re: Fuse Box
Post by: yellow1912 on January 24, 2006, 05:03:02 AM
Awesome mod, will it work with the new SMF (1.1RC2) ?
Title: Re: Fuse Box
Post by: TLM on January 24, 2006, 08:22:12 PM
Quote from: yellow1912 on January 24, 2006, 05:03:02 AM
Awesome mod, will it work with the new SMF (1.1RC2) ?
I made an interface for the smf built in one for the 1.1 series.  But the mod sits unapproved...
Title: Re: Fuse Box
Post by: Cerberus on January 24, 2006, 11:44:08 PM
so let's wait :)
Title: Re: Fuse Box
Post by: TLM on January 25, 2006, 12:18:07 AM
Quote from: Cerberus on January 24, 2006, 11:44:08 PM
so let's wait :)
As far as I know its been rejected by the mod team and they have not approved it due to it would be used by "idiot"'s which I can clearly see that happening...

*points to sig*
Title: Re: Fuse Box
Post by: Anguz on January 25, 2006, 10:17:33 AM
Thx, TLM.

yellow1912, if you know what you're doing, you can follow Ben_S' instructions to enable the feature in 1.1 (http://www.simplemachines.org/community/index.php?topic=16119.msg324914#msg324914). If you're not sure, ask for support there or better wait. HTH.
Title: Re: Fuse Box
Post by: TLM on January 25, 2006, 10:25:41 AM
Well it appears that you can download the mod but it just does not show up in the list.

*edit*
Talked to Dan last night, it was allowed for dload but not put on the mod site, so click here (http://mods.simplemachines.org/index.php?mod=250) to go to the mod page to dload.  Do tell me if I got the lableing right...
*/edit*
Title: Re: Fuse Box
Post by: Craig on February 13, 2006, 12:48:22 PM
anyone got a copy of this mod the download isnt working  :(

im using smf 1.0.3  :)
Title: Re: Fuse Box
Post by: Fizzy on February 14, 2006, 02:15:19 AM
Hi Craig,

Best advice is to upgrade to either SMF 1.0.6 or SMF 1.1 RC2

SMF 1.0.3 is not considered to be secure and should be upgraded immediately

Regards

Fizz
Title: Re: Fuse Box
Post by: Craig on February 16, 2006, 02:33:01 PM
tried thto upgrade to rc2 but have had murders with my massive forum  :(

so has anyone got a old copy of this as the mod link isnt working :(
Title: Re: Fuse Box
Post by: Razerst on February 17, 2006, 12:26:52 AM
only works for version 105. Can you mod this so can work on rc2 version?
Title: Re: Fuse Box
Post by: Anguz on February 17, 2006, 02:05:10 AM
Reply #150 (http://www.simplemachines.org/community/index.php?topic=19379.msg464506#msg464506)
Title: Re: Fuse Box
Post by: Fizzy on February 17, 2006, 04:47:17 PM
Quote from: Craig on February 16, 2006, 02:33:01 PM
tried thto upgrade to rc2 but have had murders with my massive forum  :(

so has anyone got a old copy of this as the mod link isnt working :(

Hi Craig,

Upgrade to 1.0.6 (safe version) and then install the 1.0.5 version of the Mod and you should be fine.
Title: Re: Fuse Box
Post by: Craig on February 20, 2006, 05:46:08 PM
Quote from: Fizzy on February 17, 2006, 04:47:17 PM
Quote from: Craig on February 16, 2006, 02:33:01 PM
tried thto upgrade to rc2 but have had murders with my massive forum  :(

so has anyone got a old copy of this as the mod link isnt working :(

Hi Craig,

Upgrade to 1.0.6 (safe version) and then install the 1.0.5 version of the Mod and you should be fine.

thanks for the reply will do but i can download the mod in zip format from the mod section but it wont open i think the download file isnt right on this sites mod download section.
Title: Re: Fuse Box
Post by: rev616 on March 20, 2006, 12:59:18 AM
i cant get this mod to work.im using 1.0.6
Title: Re: Fuse Box
Post by: yellow1912 on July 15, 2006, 04:00:33 PM
how can edit ModSettings.php?
Quote<edit file>
$sourcedir/ModSettings.php
</edit file>

<search for>
      array('heading', &$txt['mods_cat_layout']),
</search for>

<add before>
      array('rule'),
         // Fuse Box.
         array('check', 'fuseBox'),
         array('float', 'fuseBox_forum', 5),
         array('float', 'fuseBox_search', 5),
         array('float', 'fuseBox_unreadAll', 5),
         array('float', 'fuseBox_stats', 5),
         array('float', 'fuseBox_autoOptDb', 5),
</add before>

Unable to find array('heading', &$txt['mods_cat_layout']),

(Using SMF 1.1 RC2)
Title: Re: Fuse Box
Post by: Anguz on July 18, 2006, 11:49:42 AM
This mod is not compatible with 1.1. The feature is built-in, actually, but I don't think it has a GUI for it yet.
Title: Re: Fuse Box
Post by: qtime on January 13, 2007, 08:09:51 AM
Is it possible to set up the hidden fuse function matching a certain membergroup?
like guests server 10
donators server 20
Title: Re: Fuse Box
Post by: Fizzy on January 13, 2007, 01:17:47 PM
?? But server load is not user-dependant. You can't say that one member/guest is using up more resources than another. Not unless you wanted to run an independent server for each membergroup (a curious but expensive idea).
Title: Re: Fuse Box
Post by: qtime on January 13, 2007, 01:20:32 PM
I understand, but the question is: is it possible to use the fuse related to membergroups
hold up guests earlier than donators.
Title: Re: Fuse Box
Post by: mikemotorcade on January 31, 2007, 03:38:34 PM
He means if the server load at, say 10, then don't allow guests to use a certain function. at 20, don't allow regular users, etc. and so on..
Title: Re: Fuse Box
Post by: qtime on January 31, 2007, 04:07:49 PM
right, I am still want this option very much  :D!!!!
Title: Re: Fuse Box
Post by: look up on February 05, 2007, 08:50:57 PM
this seems like a good mod to have.

will it be updated for 1.1.1?
Title: Re: Fuse Box
Post by: zepfms on February 25, 2007, 04:59:56 PM
Quote from: look up on February 05, 2007, 08:50:57 PM
this seems like a good mod to have.

will it be updated for 1.1.1?

+1
Title: Re: Fuse Box
Post by: Ben_S on February 25, 2007, 05:16:12 PM
Similar functionality is included in 1.1x by default http://www.simplemachines.org/community/index.php?topic=76249.0
Title: Re: Fuse Box
Post by: drgsldr69 on October 10, 2007, 11:46:08 PM
i sooooo want this for my site, i am using 1.1.4 and it says the file is corrupt of not compatable is there a newer version that is compatable?
Title: Re: Fuse Box
Post by: Tony Reid on October 11, 2007, 04:20:32 AM
Quote from: drgsldr69 on October 10, 2007, 11:46:08 PM
i sooooo want this for my site, i am using 1.1.4 and it says the file is corrupt of not compatable is there a newer version that is compatable?

Check the post above - similar functions are built into 1.1.4 also.
Title: Re: Fuse Box
Post by: vkot on April 08, 2009, 02:55:12 AM
Does this mod work with SMF 2.0?
If not, will it be upgraded?
Title: Re: Fuse Box
Post by: Biology Forums on June 25, 2012, 10:22:51 PM
Thanks for this mod! Definitely reuquired for a large website.
Title: Re: Fuse Box
Post by: Realinfo on October 25, 2012, 06:27:33 AM
Can't we get it for 2.0.2............
Title: Re: Fuse Box
Post by: stylusss on November 26, 2012, 11:16:54 PM
Downloaded this mod a long time ago, before I had a lot of traffic. Just concluded how amazing it is if you have limited resources, such as RAM and you don't want the server to crash. :)