#49616 [Opn->Csd]: Impossible to increase SOMAXCONN
| From: | ben at realitychecknetwork dot com | Date: | Wed, 23 Sep 2009 03:12:48 +0000 |
| Subject: | #49616 [Opn->Csd]: Impossible to increase SOMAXCONN | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-142736@lists.php.net to get a copy of this message | ||
ID: 49616
User updated by: ben at realitychecknetwork dot com
Reported By: ben at realitychecknetwork dot com
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: Linux 2.6.18
PHP Version: 5.2.11
New Comment:
In CentOS5.3 its actually : /usr/include/linux/socket.h
Thanks, that did the trick.
Replace:
/* Maximum queue length specifiable by listen. */
#define SOMAXCONN 128
With:
/* Maximum queue length specifiable by listen. */
#define SOMAXCONN 2048
Then recompile PHP
Previous Comments:
------------------------------------------------------------------------
[2009-09-22 09:38:30] sjoerd@php.net
PHP uses the SOMAXCONN from sys/socket.h at compile time.
------------------------------------------------------------------------
[2009-09-21 20:22:24] ben at realitychecknetwork dot com
Description:
------------
Impossible to increase SOMAXCONN value by updating system OS variable.
PHP must be compiled with --enable-sockets for this bug to be produced.
OS setting updated with:
# sysctl -w net.core.somaxconn=2048
net.core.somaxconn = 2048
PHP will always return 128 for SOMAXCONN and will not respect the OS
setting. Additionally, it will ignore a define statement in PHP code and
return 128 as well.
Reproduce code:
---------------
define("SOMAXCONN", 2048);
echo SOMAXCONN;
Expected result:
----------------
Should return 2048
Actual result:
--------------
Returns 128
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49616&edit=1