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:

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!


Previous Comments:
------------------------------------------------------------------------

[2009-10-23 19:24:29] [email protected]

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] [email protected]

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!

------------------------------------------------------------------------

[2009-10-23 18:37:11] ed at bellcpa dot com

Worked around the problem for now by testing the connection with
fsockopen prior to real_connect.

------------------------------------------------------------------------

[2009-10-23 17:13:43] ed at bellcpa dot com

Oh but I did search and have seen #49511 propr to submitting....


#49511 mainly focuses on a query timeout and not a connection timeout,
which is my issue. MYSQL_OPT_CONNECT_TIMEOUT mentioned is unaddressed.

Also tried ini_set('default_socket_timeout', 5) as suggested in that
submission with no effect.

------------------------------------------------------------------------

[2009-10-23 10:22:33] [email protected]

See bug #49511, and thank you for not searching before submitting..

------------------------------------------------------------------------

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

Reply via email to