icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Shared Hosting » Report Shared Hosting Concern » SH102, PHP having name resolving issues

Report Shared Hosting Concern Please use this section to notify us of any problem or concern.

Reply
 
LinkBack Thread Tools Search this Thread
Old July 2nd, 2008, 7:20 AM   #1 (permalink)
Race Surpass
Super #1
 
MarkRH's Avatar
 
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,219 posts
Gave thanks: 18
Thanked 86 times
SH102, PHP having name resolving issues

Ticket: BZG-526427

The effect can be seen here: http://www.markheadrick.com/php/server_status.php

Everything uses the same code:
PHP Code:
while ($count $ports)
{
    if (
$ip[$count] == '')
    {
        
$ip[$count] = 'localhost';
    }
    
$port_starttime getmicrotime();
    
$fp = @fsockopen($ip[$count], $port[$count], $errno$errstr$timeout);
    if (!
$fp)
    {
        echo 
"<tr>\n  <td>{$service[$count]}</td>\n  <td class=\"offline\">Offline</td>\n<td>".number_format((getmicrotime() - $port_starttime), 4)." seconds</td></tr>\n";
    }
    else
    {
        echo 
"<tr>\n  <td>{$service[$count]}</td>\n  <td class=\"online\">Online</td>\n<td>".number_format((getmicrotime() - $port_starttime), 4)." seconds</td></tr>\n";
        
fclose($fp);
    }
    
$count++;

I am getting up to a 10 second delay when using cURL or fsockopen() to connect to a website outside the server or one of my subdomains on the server. For example, my main page at Mark R Headrick's Web Page uses cURL to connect to gallery.markheadrick.com and it is generally timing out, taking over 5 seconds.

I think what's throwing support a loop at the moment is that from a SSH prompt you can ping google.com or gallery.markheadrick.com and get the name to resolve immediately... but not parts of PHP it seems. Was working fine up until a few hours ago.
MarkRH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 2nd, 2008, 7:34 AM   #2 (permalink)
Race Surpass
Super #1
 
MarkRH's Avatar
 
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,219 posts
Gave thanks: 18
Thanked 86 times
Oh thought I should probably mention that my blog stuff on my main site is a static text file that I include. I only generate that content when I make a new post.
MarkRH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 2nd, 2008, 8:25 AM   #3 (permalink)
Surpass Fan
Excelling Contributor
 
cowboy's Avatar
 
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
934 posts
Gave thanks: 2
Thanked 94 times
I would blame the delays on the responding servers. Why don't you loop with individual AJAX calls so the page itself will load and only each status can wait.
__________________
Where would you be if you were at the highest court in the land (US)?
cowboy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 2nd, 2008, 8:51 AM   #4 (permalink)
Race Surpass
Super #1
 
MarkRH's Avatar
 
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,219 posts
Gave thanks: 18
Thanked 86 times
Well, the responding server in this case is itself, sh102.

Maybe I can change the code so the browser executes javascript to get the image block rather than the php script itself using cURL to include it the html it sends to the browser. That doesn't really solve the problem though.
MarkRH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 2nd, 2008, 2:16 PM   #5 (permalink)
Race Surpass
Super #1
 
MarkRH's Avatar
 
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,219 posts
Gave thanks: 18
Thanked 86 times
Hmmm... wonder if that Circuit Turn-Up deal has any part in this or just a coincidence? Seems as if the ticket has stalled for the last 6 hours at 3rd level support.

MarkRH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 3rd, 2008, 1:48 AM   #6 (permalink)
Race Surpass
Super #1
 
MarkRH's Avatar
 
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,219 posts
Gave thanks: 18
Thanked 86 times
Still broken somewhere. Ticket was assigned at 2:55pm yesterday and no response after that. See what the morning holds...
MarkRH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 3rd, 2008, 2:53 PM   #7 (permalink)
Race Surpass
Super #1
 
MarkRH's Avatar
 
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,219 posts
Gave thanks: 18
Thanked 86 times
Still broke. Check out the connection lags with fsockopen() with a domain/sub-domain vs an ip address. I'd use an ip address to get around the lag but that doesn't work with domains or sub-domains on the same server. Under normal operation conditions, this whole script should take less than a second... not 34 seconds. Eeek!



Something tells me this isn't going to be resolved until after the weekend holiday... Well, it might be, but I'm going to the parents soon.
MarkRH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 8th, 2008, 12:55 AM   #8 (permalink)
Race Surpass
Super #1
 
MarkRH's Avatar
 
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,219 posts
Gave thanks: 18
Thanked 86 times
Looks like around 6:00am on July 4th the problem was resolved by the Unix Admins. Thought I should post that everything seems to be working fine now.
MarkRH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 13th, 2008, 1:42 PM   #9 (permalink)
Race Surpass
Super #1
 
MarkRH's Avatar
 
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,219 posts
Gave thanks: 18
Thanked 86 times
Well, this is happening again. I've re-opened the ticket and so far after two back and forths with support they don't get it or I'm just not communicating the issue properly (which I shouldn't have to at all since it's all already in the ticket's history). I don't think I'll reply back on the ticket until Monday so I can get someone that works during the week.

Maybe all the techs are just frazzled from dealing with these Network issues or something and brains have turned to mush... which having worked in several tech support jobs myself I can certainly understand.
MarkRH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On