Endless loop in Roster Diag when wowroster.net is down

Requests, feedback, and general discussion about WoWRoster
DO NOT post topics about WoWRoster AddOns here!

Endless loop in Roster Diag when wowroster.net is down

Postby Tremere » Mon Feb 12, 2007 10:22 am

This is concerning Wowroster 1.7.2:

In lib/rosterdiag.lib.php in function GrabRemoteVersions() there's the following line:

$handle = fopen($svnremote, 'rb');

If wowroster.net is down that line will not create a handle and the program will be stuck in the following loop:

while (!feof($handle))
{
$contents .= fread($handle, 1024*80);
}

There should be a check on the first line to see if fopen fails or not and return from the function with an appropriate error message or return code.

Last night I couldn't reach wowroster.net and my webserver logs blew up to several hundred MB's in a matter of seconds, which caused my whole server to crash.

Thanks in advance for any help.
Tremere
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Sun Jan 28, 2007 2:12 pm

Endless loop in Roster Diag when wowroster.net is down

Postby zanix » Tue Feb 13, 2007 8:00 am

WoW...
I'm very sorry

I guess the code was written in a way that it wasn't expected for our site to go down
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Endless loop in Roster Diag when wowroster.net is down

Postby zanix » Wed Feb 14, 2007 7:50 am

I'll see what I can do to fix this before 1.7.3 is released
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Endless loop in Roster Diag when wowroster.net is down

Postby Tremere » Wed Feb 14, 2007 11:03 am

Thank you very much. For now I've disabled the whole SVN thing just in case.
Tremere
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Sun Jan 28, 2007 2:12 pm


Return to General Support & Feedback

Who is online

Users browsing this forum: No registered users and 1 guest

cron