RE: [PHP-DB] Mysterious 5 second delay on sybase_connect()
| From: | Tom Lloyd | Date: | Thu, 24 May 2012 15:25:57 +0000 |
| Subject: | RE: [PHP-DB] Mysterious 5 second delay on sybase_connect() | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-48293@lists.php.net to get a copy of this message | ||
I'm getting increasingly suspicious that DNS is to blame. If I was to do something like:
$conn = sybase_connect( "10.0.0.11\SQLMAIN", $user, $pass )
Would that trigger a lookup of some variety?
-----Original Message-----
From: Matijn Woudt [mailto:tijnema@gmail.com]
Sent: 24 May 2012 13:00
To: Tom Lloyd
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Mysterious 5 second delay on sybase_connect()
On Thu, May 24, 2012 at 10:51 AM, Tom Lloyd <TomLloyd@wallcolmonoy.co.uk> wrote:
> Hi there. I'm working on a PHP-driven project on Debian Squeeze that
> connects to an instance of Microsoft SQL Server on Windows Server 2008.
> I'm using the sybase extensions to PHP.
>
> Since I rebooted the webserver on the weekend, both the
> sybase_connect() and sybase_pconnect() commands will sometimes take
> exactly 5 seconds to execute. It seems to be random whether they do
> this or not. I can't think of anything that could have been changed
> by the reboot, unless a package was updated but its associated process never got restarted...
>
> Does anyone know what might cause this behaviour?
>
> Cheers,
> Tom Lloyd
>
It most likely has nothing to do with PHP, but is rather a routing issue. 5 seconds is the default
connection time out for TCP/IP, so it probably makes sense that the connection is failing at a lower
level.
- Matijn