|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72372 Blocking TCP socket connection does not timeout
Submitted: 2016-06-09 19:38 UTC Modified: 2016-09-27 15:15 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: gohanman at gmail dot com Assigned:
Status: Closed Package: Sockets related
PHP Version: 7.0.1 OS: Windows 10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: gohanman at gmail dot com
New email:
PHP Version: OS:


 [2016-06-09 19:38 UTC] gohanman at gmail dot com
I don't have any kind of simple repro for this, unfortunately. I'm trying to upgrade an app from 5.6 to 7.0. The app works fine in 7.0 for some period of time and then every single mysqli connection attempt starts failing with this error:

Warning: mysqli::mysqli(): (HY000/2002): An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.

As far as I can tell this is the result of the OS itself running out of memory for TCP buffers ( I'm not using either of the ini switches mention in the Microsoft article. This problem does not occur using 5.6 with the same app on the same system.

I'm seeing this issue with exactly one client browser executing PHP scripts via HTTP requests. Closing the client browser and waiting for several minutes does not seem to release any resources. Once the error occurs it continues to occur on every connection attempt until Apache is restarted.

I'm using the 32bit, thread-safe 7.0.7 build from with 32-bit apache 2.4.20 binaries from Apache Lounge.

Besides mysqli, I'm enabling php_opcache as well as these extensions: curl, gettext, intl, mbstring, openssl, sockets, xsl.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-09-27 15:15 UTC] gohanman at gmail dot com
-Summary: Eventual connectivity error +Summary: Blocking TCP socket connection does not timeout -Status: Open +Status: Closed -Package: MySQLi related +Package: Sockets related -PHP Version: 7.0.7 +PHP Version: 7.0.1
 [2016-09-27 15:15 UTC] gohanman at gmail dot com
Follow-up: I just observed the same issue on a different but ideally spec'd machine running PHP 5.6.x. Otherwise the environment is identical so this must not be a 5.6 => 7.0 related problem.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 12:01:29 2024 UTC