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] sjo...@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

Reply via email to