Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Don't start slave when reload app#464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
weberdever wants to merge1 commit intophp-pm:master
base:master
Choose a base branch
Loading
fromtutu-ru:fix-reload

Conversation

@weberdever
Copy link

This fixed:

Testab -c 10 -n 500 "http://localhost:8080/abtesting/" & bash -c "sleep 5; ./vendor/bin/ppm reload --cgi-path=/usr/local/bin/php"

Without the fix, I see errors in stderr ppm:

Current memory usage for worker 5505: 14.00 MB[27/Aug/2019:10:05:25 +0300] 172.17.0.1 - - "GET /abtesting HTTP/1.0" 200 18323 "-"Worker 5505 took abnormal 2.632 seconds for handling a connectionMarking locked worker #5505 as closedWorker #5505 closed after 0 handled requestsStart new worker #5505Worker #5505 has been closed, reloading.Start new worker #5505In SlavePool.php line 29:  [Exception]  Slave port 5505 already occupied.Exception trace:  at /var/www/html/vendor/php-pm/php-pm/src/SlavePool.php:29 PHPPM\SlavePool->add() at /var/www/html/vendor/php-pm/php-pm/src/ProcessManager.php:1238 PHPPM\ProcessManager->newSlaveInstance() at /var/www/html/vendor/php-pm/php-pm/src/ProcessManager.php:1024 PHPPM\ProcessManager->PHPPM\{closure}() at /var/www/html/vendor/php-pm/php-pm/src/ProcessManager.php:1068 PHPPM\ProcessManager->PHPPM\{closure}() at /var/www/html/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php:123 Evenement\EventEmitter->emit() at /var/www/html/vendor/react/stream/src/Util.php:71 React\Stream\Util::React\Stream\{closure}() at /var/www/html/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php:123 Evenement\EventEmitter->emit() at /var/www/html/vendor/react/stream/src/DuplexResourceStream.php:138 React\Stream\DuplexResourceStream->close() at /var/www/html/vendor/react/socket/src/Connection.php:118 React\Socket\Connection->close() at /var/www/html/vendor/php-pm/php-pm/src/RequestHandler.php:301 PHPPM\RequestHandler->slaveClosed() at /var/www/html/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php:123 Evenement\EventEmitter->emit() at /var/www/html/vendor/react/stream/src/Util.php:71 React\Stream\Util::React\Stream\{closure}() at /var/www/html/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php:123 Evenement\EventEmitter->emit() at /var/www/html/vendor/react/stream/src/DuplexResourceStream.php:138 React\Stream\DuplexResourceStream->close() at /var/www/html/vendor/react/stream/src/DuplexResourceStream.php:197 React\Stream\DuplexResourceStream->handleData() at /var/www/html/vendor/react/event-loop/src/StreamSelectLoop.php:244 React\EventLoop\StreamSelectLoop->waitForStreamActivity() at /var/www/html/vendor/react/event-loop/src/StreamSelectLoop.php:211 React\EventLoop\StreamSelectLoop->run() at /var/www/html/vendor/php-pm/php-pm/src/ProcessManager.php:521 PHPPM\ProcessManager->run() at /var/www/html/vendor/php-pm/php-pm/src/Commands/StartCommand.php:52 PHPPM\Commands\StartCommand->execute() at /var/www/html/vendor/symfony/console/Command/Command.php:255 Symfony\Component\Console\Command\Command->run() at /var/www/html/vendor/symfony/console/Application.php:915 Symfony\Component\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/console/Application.php:272 Symfony\Component\Console\Application->doRun() at /var/www/html/vendor/symfony/console/Application.php:148 Symfony\Component\Console\Application->run() at /var/www/html/vendor/php-pm/php-pm/bin/ppm:47start [--bridge BRIDGE] [--host HOST] [--port PORT] [--workers WORKERS] [--app-env APP-ENV] [--debug DEBUG] [--logging LOGGING] [--static-directory STATIC-DIRECTORY] [--max-requests MAX-REQUESTS] [--max-execution-time MAX-EXECUTION-TIME] [--memory-limit MEMORY-LIMIT] [--ttl TTL] [--populate-server-var POPULATE-SERVER-VAR] [--bootstrap BOOTSTRAP] [--cgi-path CGI-PATH] [--socket-path SOCKET-PATH] [--pidfile PIDFILE] [--reload-timeout RELOAD-TIMEOUT] [-c|--config CONFIG] [--] [<working-directory>]Server is shutting down.Stopping the process manager.2019-08-27 07:05:28,563 INFO exited: php-ppm (exit status 1; not expected)2019-08-27 07:05:28,576 INFO spawned: 'php-ppm' with pid 179/var/www/html+---------------------+-------------------------------+| bridge              | \RMS\RestApi\PhpPM\SlimBridge || host                | 0.0.0.0                       || port                | 8080                          || workers             | 8                             || app-env             | prod                          || debug               | 0                             || logging             | 1                             || static-directory    |                               || bootstrap           | \RMS\RestApi\PhpPM\Bootstrap  || max-requests        | 1000                          || max-execution-time  | 30                            || memory-limit        | 192                           || ttl                 | 0                             || populate-server-var | 1                             || socket-path         | .ppm/run/                     || pidfile             | .ppm/ppm.pid                  || reload-timeout      | 30                            || cgi-path            | /usr/local/bin/php            |+---------------------+-------------------------------+In TcpServer.php line 164:  [RuntimeException]  Failed to listen on "tcp://0.0.0.0:8080": Address in useException trace:  at /var/www/html/vendor/react/socket/src/TcpServer.php:164 React\Socket\TcpServer->__construct() at /var/www/html/vendor/react/socket/src/Server.php:36 React\Socket\Server->__construct() at /var/www/html/vendor/php-pm/php-pm/src/ProcessManager.php:499 PHPPM\ProcessManager->run() at /var/www/html/vendor/php-pm/php-pm/src/Commands/StartCommand.php:52 PHPPM\Commands\StartCommand->execute() at /var/www/html/vendor/symfony/console/Command/Command.php:255 Symfony\Component\Console\Command\Command->run() at /var/www/html/vendor/symfony/console/Application.php:915 Symfony\Component\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/console/Application.php:272 Symfony\Component\Console\Application->doRun() at /var/www/html/vendor/symfony/console/Application.php:148 Symfony\Component\Console\Application->run() at /var/www/html/vendor/php-pm/php-pm/bin/ppm:47start [--bridge BRIDGE] [--host HOST] [--port PORT] [--workers WORKERS] [--app-env APP-ENV] [--debug DEBUG] [--logging LOGGING] [--static-directory STATIC-DIRECTORY] [--max-requests MAX-REQUESTS] [--max-execution-time MAX-EXECUTION-TIME] [--memory-limit MEMORY-LIMIT] [--ttl TTL] [--populate-server-var POPULATE-SERVER-VAR] [--bootstrap BOOTSTRAP] [--cgi-path CGI-PATH] [--socket-path SOCKET-PATH] [--pidfile PIDFILE] [--reload-timeout RELOAD-TIMEOUT] [-c|--config CONFIG] [--] [<working-directory>]Server is shutting down.Stopping the process manager.PHP Fatal error:  Uncaught ErrorException: Warning: unlink(.ppm/ppm.pid): No such file or directory in /var/www/html/vendor/php-pm/php-pm/src/ProcessManager.php:306Stack trace:#0 /var/www/html/vendor/php-pm/php-pm/src/ProcessManager.php(263): PHPPM\ProcessManager->quit()#1 [internal function]: PHPPM\ProcessManager->shutdown()#2 {main}  thrown in /var/www/html/vendor/php-pm/php-pm/src/ProcessManager.php on line 306PHP Stack trace:PHP   1. {main}() /var/www/html/vendor/php-pm/php-pm/bin/ppm:0PHP   2. Symfony\Component\Console\Application->run() /var/www/html/vendor/php-pm/php-pm/bin/ppm:472019-08-27 07:05:29,450 INFO exited: php-ppm (exit status 1; not expected)^C2019-08-27 07:05:29,786 WARN received SIGINT indicating exit request2019-08-27 07:05:29,786 INFO waiting for processes, php-ppm, statsd_exporter, confd to die2019-08-27 07:05:29,788 INFO stopped: statsd_exporter (terminated by SIGTERM)2019-08-27T07:05:29Z 00ab0492ec00 /usr/local/sbin/confd[89]: INFO Captured terminated. Exiting...2019-08-27 07:05:29,794 INFO stopped: confd (exit status 0)^C2019-08-27 07:05:30,712 WARN received SIGINT indicating exit request2019-08-27 07:05:30,714 INFO stopped: processes (terminated by SIGTERM)

@andig
Copy link
Contributor

LGTM. Ping@acasademont@dnna for cross-check.

@dnna
Copy link
Contributor

It seems to make some tests fail with 503 error "no slaves available". Is it possible this PR introduces some scenarios where the worker does not respawn when it should have?

@acasademont
Copy link
Contributor

Ah I see, the problem lies in the fact that the slave should not restart if it is closed (ie: meaning it is probably already restarting). I think this is ok.

@andig
Copy link
Contributor

Unfortunately the tests are failing. Ping@weberdever

@andig
Copy link
Contributor

Ping@weberdever

@andig
Copy link
Contributor

Could you double-check why the PR was closed?

@andig
Copy link
Contributor

I'd like to keep this open as a reminder that there is still a lurking issue. Would be great@weberdever if you could share further insights.

@andigandig reopened thisOct 22, 2019
@acasademont
Copy link
Contributor

Hi@weberdever I couldn't reproduce your issue with the current master. Could you please double check it again? Thx!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@weberdever@andig@dnna@acasademont

[8]ページ先頭

©2009-2025 Movatter.jp