summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_wireprotocol.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-02-04 15:18:45 +0100
committerNikita Popov <nikita.ppv@gmail.com>2021-02-04 15:22:34 +0100
commit5cb25a2d32df8073df7c191dd6c7694b4495af62 (patch)
tree5adba558b35e119da1761b9a5c9eaac88243bfe5 /ext/mysqlnd/mysqlnd_wireprotocol.c
parent767ddb1cd53ffc5fe4f6ca2e3072be68586f38d2 (diff)
downloadphp-git-5cb25a2d32df8073df7c191dd6c7694b4495af62.tar.gz
Fix CLI server worker support
If we create separate listening sockets in each worker using SO_REUSEADDR, then an incoming connection may be load-balanced to a process that is already busy, either due to a long-running request, or because it is a recursive request (in which case we would deadlock). Instead, only create one listening socket, and only create worker forks afterwards. This way the incoming request will be served by one of the workers that is currently listening for an incoming connection.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.c')
0 files changed, 0 insertions, 0 deletions