Skip to content

Commit 81d0e25

Browse files
authored
Use reusePort
In Workerman/5 it is NOT automatic
1 parent 6d2595d commit 81d0e25

File tree

9 files changed

+9
-0
lines changed

9 files changed

+9
-0
lines changed

frameworks/PHP/cakephp/server.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
$http_worker = new Worker('http://0.0.0.0:8080');
1111
$http_worker->count = (int) shell_exec('nproc') * 4;
12+
$http_worker->reusePort = true;
1213
$http_worker->name = 'AdapterMan-CakePHP';
1314

1415
$http_worker->onWorkerStart = static function () {

frameworks/PHP/flight/server.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
$http_worker = new Worker('http://0.0.0.0:8080');
1111
$http_worker->count = (int) shell_exec('nproc') * 4;
12+
$http_worker->reusePort = true;
1213
$http_worker->name = 'AdapterMan-Flight';
1314

1415
$http_worker->onWorkerStart = static function () {

frameworks/PHP/kumbiaphp/server.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
$http_worker = new Worker('http://0.0.0.0:8080');
1111
$http_worker->count = (int) shell_exec('nproc') * 4;
12+
$http_worker->reusePort = true;
1213
$http_worker->name = 'KumbiaPHP';
1314

1415
$http_worker->onWorkerStart = static function () {

frameworks/PHP/laravel/server-man.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
$http_worker = new Worker('http://0.0.0.0:8080');
1212
$http_worker->count = (int) shell_exec('nproc') * 4;
13+
$http_worker->reusePort = true;
1314
$http_worker->name = 'AdapterMan-Laravel';
1415
$http_worker->onWorkerStart = static function () {
1516
Header::$date = gmdate(DATE_RFC7231);

frameworks/PHP/leaf/server.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
$http_worker = new Worker('http://0.0.0.0:8080');
1212
$http_worker->count = (int) shell_exec('nproc') * 4;
13+
$http_worker->reusePort = true;
1314
$http_worker->name = 'AdapterMan-Leaf';
1415

1516
$http_worker->onWorkerStart = static function () {

frameworks/PHP/php/deploy/workerman/start.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// WebServer
1111
$web = new Worker("http://0.0.0.0:8080");
1212
$web->count = (int) shell_exec('nproc') * 4;
13+
$web->reusePort = true;
1314
$web->name = 'workerman';
1415

1516
define('WEBROOT', '/php/');

frameworks/PHP/slim/server.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
$http_worker = new Worker('http://0.0.0.0:8080');
1212
$http_worker->count = (int) shell_exec('nproc') * 4;
13+
$http_worker->reusePort = true;
1314
$http_worker->name = 'AdapterMan-Slim';
1415

1516
$http_worker->onWorkerStart = static function () {

frameworks/PHP/symfony/server.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
$http_worker = new Worker('http://0.0.0.0:8080');
1212
$http_worker->count = (int) shell_exec('nproc') * 4;
13+
$http_worker->reusePort = true;
1314
$http_worker->name = 'AdapterMan-Symfony';
1415

1516
$http_worker->onWorkerStart = static function () {

frameworks/PHP/yii2/server.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
$http_worker = new Worker('http://0.0.0.0:8080');
1313
$http_worker->count = (int) shell_exec('nproc') * 4;
14+
$http_worker->reusePort = true;
1415
$http_worker->name = 'AdapterMan-Yii2';
1516

1617
$http_worker->onWorkerStart = static function () {

0 commit comments

Comments
 (0)