You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our ulimit -n is 100001 and why adding SW_MAX_CONNECTION and force SwooleG.max_sockets lower than 10000 ? BTW, How can I change the SW_MAX_CONNECTION value on PHP level instead of changing the value in .c file and recompile the source code ?
The text was updated successfully, but these errors were encountered:
stormeyes
changed the title
what's the purpose of forcing max connection lower than SW_MAX_CONNECTION
What's the purpose of forcing max connection lower than SW_MAX_CONNECTION
Nov 20, 2018
Please configure the max_connection parameter by the set method.
The reason for this modification is that the default ulimit value on the small memory machine is too large and the service cannot be started.
<?php
$http = new swoole_http_server("127.0.0.1", 9501);
$http->set(['max_conn' => 50000]);
$http->on("start", function ($server) {
echo "Swoole http server is started at http://127.0.0.1:9501\n";
});
$http->on("request", function ($request, $response) {
$response->header("Content-Type", "text/plain");
$response->end("Hello World\n");
});
$http->start();
After upgrading to v4.2.8, we got
WARNING swServer_start_check: serv->max_connection is exceed the maximum value[10000]
. And we found this commit https://github.com/swoole/swoole-src/commit/bc7fcac06a69bd845c12e553f58d8c7a2115c432 cause this problem.Our ulimit -n is 100001 and why adding SW_MAX_CONNECTION and force SwooleG.max_sockets lower than 10000 ? BTW, How can I change the SW_MAX_CONNECTION value on PHP level instead of changing the value in .c file and recompile the source code ?
The text was updated successfully, but these errors were encountered: