Site hiccup! Back to normal now.
Site hiccup! Back to normal now.
Hey folks,
The server had a hiccup today and became fairly unstable, but we should be back to normal now and I learned some valuable lessons to avoid this type of problem in the future.
Live and learn!
Cheers,
Seraph0x
The server had a hiccup today and became fairly unstable, but we should be back to normal now and I learned some valuable lessons to avoid this type of problem in the future.
Live and learn!
Cheers,
Seraph0x
Re: Site hiccup! Back to normal now.
You don't want to share your lessons? :)
Re: Site hiccup! Back to normal now.
Well, if you're interested, here goes:Foxhawke wrote:You don't want to share your lessons? :)
Code: Select all
function cut_at_word($text, $len) {
$text = str_replace('<br />', ' ', $text);
$text = preg_replace('/\<.*?\>/', '', $text);
if(strlen($text) <= $len) return $text;
$i = $len;
while(substr($text, $i, 1) != ' ') {
$i--;
}
return substr($text, 0, $i).'...';
}
Solution below (click and drag from * to *):
*The while loop never ends if the text doesn't contain a space. Since this function was used to truncate posts for the front page, the front page would hang every time when the latest post didn't have a space in it.*
Explanation for non-geeks: Princess Christie unintentionally and completely innocently took down our server using this post. This was possible due to a programming mistake I made and which is now fixed.
-
- Community Manager
- Posts: 995
- Joined: Sat Sep 30, 2006 3:57 am
- Gender: Male
- Sexual Orientation: Straight
- I am a: None of the above
- Location: Midwest USA
Re: Site hiccup! Back to normal now.
Well, I'd much rather a programming error than another DoS attack, which is what I figured had happened.
Nice work getting that fixed.
(And being a programmer myself, I'm a bit ashamed to say I didn't see the error before highlighting the fix. To my credit though, I don't even recognize that language.)
Nice work getting that fixed.
(And being a programmer myself, I'm a bit ashamed to say I didn't see the error before highlighting the fix. To my credit though, I don't even recognize that language.)
-
- Resident Mistress
- Posts: 352
- Joined: Sat Oct 21, 2006 5:49 am
- Location: Australia
- Contact:
Re: Site hiccup! Back to normal now.
I still dont know what Phoxy is talking about....
Ill just smile and nod,
Ill just smile and nod,
The Mistress From Oz
Re: Site hiccup! Back to normal now.
Hehe, that's a classic. I do php coding (amongst other things) for a living and I've done similar errors myself. Loops can be dangerous stuff.seraph0x wrote:Anybody see anything wrong with that code?
Re: Site hiccup! Back to normal now.
Hehe ive done the un-ending loop before too...
I was making an email bomb (i know i know, not good but he deserved it, cheating, woman abusing scum bag!) and the idea was to have the $i value be set by me to something like 10 and the loop would run 10 times and send 10 emails... Well i forgot to add the line that takes 1 away from the $1 variable... So the loop ran forver. not too bad you might think, until i tell you that i was testing it on my own email address and ended up with literally hundreds of emails a minute! Luckily i was just testing it on a lycos tripod free account so i had to delete my account, and the emails still carried on for a few minutes until the server truly destroyed my scripts. Haha!
It wasnt pretty! I was on MSN at the time and the emails were so fast that as soon as one alert disappeared i had another. I cant remember how many emails i got in the end but it was several pages worth :D
anyway, glad you got it sorted in the end!
I was making an email bomb (i know i know, not good but he deserved it, cheating, woman abusing scum bag!) and the idea was to have the $i value be set by me to something like 10 and the loop would run 10 times and send 10 emails... Well i forgot to add the line that takes 1 away from the $1 variable... So the loop ran forver. not too bad you might think, until i tell you that i was testing it on my own email address and ended up with literally hundreds of emails a minute! Luckily i was just testing it on a lycos tripod free account so i had to delete my account, and the emails still carried on for a few minutes until the server truly destroyed my scripts. Haha!
It wasnt pretty! I was on MSN at the time and the emails were so fast that as soon as one alert disappeared i had another. I cant remember how many emails i got in the end but it was several pages worth :D
anyway, glad you got it sorted in the end!
Re: Site hiccup! Back to normal now.
Hehe, glad a few of the techies got a kick out of it.
Everyone else: Don't worry, I'm not about to turn Milovana into a blog about programming.
Everyone else: Don't worry, I'm not about to turn Milovana into a blog about programming.
- Jaberwocky
- Explorer At Heart
- Posts: 314
- Joined: Fri Dec 29, 2006 11:32 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
- Location: The Netherlands
Re: Site hiccup! Back to normal now.
omssx, I know another way to create some email issues...
Situation:
An email server that was on the agenda to be replaced by a newer program, and more than one mail-domain.
Here is what a user did:
- He wrote an out of office notification rule to automatically reply to people that he is on vacation
- No wait, he wrote a second, slightly different rule, as well!
- He tested it by sending himself an email
- He took a plane out of the country
It was not just a regular email bouncing around, but a multiplying bouncing email! Log on to the mailserver or the spamfilter was difficult because the system was for some reasosn pre-occupied. After two days, 250,000 emails have passed the spamfilter, and 620,000 emails were still in queue.
Thank god it happened to a collegue of mine.
Situation:
An email server that was on the agenda to be replaced by a newer program, and more than one mail-domain.
Here is what a user did:
- He wrote an out of office notification rule to automatically reply to people that he is on vacation
- No wait, he wrote a second, slightly different rule, as well!
- He tested it by sending himself an email
- He took a plane out of the country
It was not just a regular email bouncing around, but a multiplying bouncing email! Log on to the mailserver or the spamfilter was difficult because the system was for some reasosn pre-occupied. After two days, 250,000 emails have passed the spamfilter, and 620,000 emails were still in queue.
Thank god it happened to a collegue of mine.
Re: Site hiccup! Back to normal now.
Aww, such a tease!seraph0x wrote:Everyone else: Don't worry, I'm not about to turn Milovana into a blog about programming.
Re: Site hiccup! Back to normal now.
hahaha damn i bet that hurt when he got back!After two days, 250,000 emails have passed the spamfilter, and 620,000 emails were still in queue.
Good way to disrupt a mail server though! Ill remember that ;)
Re: Site hiccup! Back to normal now.
Doesn't work nearly as well anymore. Mailservers are much better at handling large amounts of emails suddenly appearing and will usually discard them and blacklist the sender (the server, not the email) for a while (a few hours to a few days or more). In this day and age when spam is such a rampart problem these things doesn't work nearly as well as they used to five or ten years ago.omssx wrote:Good way to disrupt a mail server though! Ill remember that ;)
Who is online
Users browsing this forum: No registered users and 4 guests