#49965 [Fbk->Opn]: Setting MYSQLI_OPT_CONNECT_TIMEOUT does not seem to have an effect on timeout
| From: | ed at bellcpa dot com | Date: | Tue, 27 Oct 2009 21:19:51 +0000 |
| Subject: | #49965 [Fbk->Opn]: Setting MYSQLI_OPT_CONNECT_TIMEOUT does not seem to have an effect on timeout | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-144030@lists.php.net to get a copy of this message | ||
ID: 49965
User updated by: ed at bellcpa dot com
Reported By: ed at bellcpa dot com
-Status: Feedback
+Status: Open
Bug Type: MySQLi related
Operating System: Windows Server 2008
PHP Version: 5.3.0
New Comment:
Hi Ulf,
I tried a 5.3.2-dev VC9 x86 thread-safe snapshot (not sure how to
obtain 5.3.1) with same results. Also tried a 5 second
default_socket_timeout with no effect.
Will send the captures to you by email.
Thanks
Previous Comments:
------------------------------------------------------------------------
[2009-10-27 10:06:56] uw@php.net
Regarding wireshark protocol: yes, please do mail them to me or offer
them for download anywhere (make sure they don't show any confidential
data, e.g. server IP, username, password!)
Thanks!
Ulf
------------------------------------------------------------------------
[2009-10-27 10:04:54] uw@php.net
60s - we are back to some config problem. Can you try change the
default_socket_timeout? Can you try a 5.3.1 snapshot?
Thanks!
Ulf
------------------------------------------------------------------------
[2009-10-26 21:10:09] ed at bellcpa dot com
After further testing:
The php_errors.log messages previously mentioned are logged exactly 60
sec after a connection attempt is made so some timeout is likely in
effect. Also, the script remains running in a "hung" state after the
errors are logged.
Post connection timeout is not a concern here, instead the issue is
with the length of the timeout when MySQL server is purposely not
online.
I have Wireshark captures for when the MySQL server is offline and
connection times out as well as when MySQL is online and connection
succeeds right away. Can I email these to you?
I am using mysqli on 5.3.0 with default settings, shouldn't mysqlnd be
used by default?
I will try a snapshot soon once I find the time to test.
Thanks!
------------------------------------------------------------------------
[2009-10-23 19:24:29] uw@php.net
PS: don't rely on connect timeout of libmysql - it does not work in
every case. Check bugs.mysql.com.
------------------------------------------------------------------------
[2009-10-23 19:22:04] uw@php.net
Can you give more details? I'm unable to reproduce the issue with
5.3.2-dev (= should become 5.3.1). Is it possible for you to try a
snapshot? Can you provide me with a Wireshark (network sniffer)
protocol?
The connect timeout itself should work. If not, it should be a streams
or Windows matter. First question is what exactly "connect timeout"
means. A wireshark protocol should be able to tell. In 5.3.0 you may get
a successful connect within the time limit you set but then, when
reading data, experience default_socket_timeout.
Thanks!
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/49965
--
Edit this bug report at http://bugs.php.net/?id=49965&edit=1