Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timer 'max-execution-time' works strangely #484

Open
alexpts opened this issue Dec 6, 2019 · 3 comments
Open

Timer 'max-execution-time' works strangely #484

alexpts opened this issue Dec 6, 2019 · 3 comments

Comments

@alexpts
Copy link

alexpts commented Dec 6, 2019

I have worker process with sleep(2 sec). Option max-execution-time is 4 sec. I see error Maximum execution time exceeded sometime.

My config and extend log:
+---------------------+-----------------------------------------+
| bridge | PHPPM\Bridges\Psr15Middleware |
| host | 0.0.0.0 |
| port | 9001 |
| workers | 1 |
| app-env | production |
| debug | 1 |
| logging | 1 |
| bootstrap | DdMonitoring\PmmAdapter |
| max-requests | 20 |
| populate-server-var | |
| max-execution-time | 4 |
| memory-limit | 24 |
| ttl | 3600 |
| reload-timeout | 5 |
| static-directory | |
| socket-path | .ppm/run/ |
| pidfile | .ppm/ppm.pid |
| cgi-path | /usr/local/Cellar/php/7.4.0/bin/php-cgi |
+---------------------+-----------------------------------------+
Starting PHP-PM with 1 workers, using StreamSelectLoop ...
1 workers (starting at 5501) up and ready. Application is ready at http://0.0.0.0:9001/
Method RequestHandler::SlaveClose -> cancelTimer
[06/Dec/2019:07:06:45 +0000] 127.0.0.1 - - "GET /asterisk/connect/ HTTP/1.1" 200 291 "-"
Method RequestHandler::maxExecutionTimeExceeded
Maximum execution time of 4 seconds exceeded. Closing worker.
Method RequestHandler::SlaveClose -> cancelTimer
Method RequestHandler::maxExecutionTimeExceeded
Maximum execution time of 4 seconds exceeded. Closing worker.
Method RequestHandler::SlaveClose -> cancelTimer
Method RequestHandler::maxExecutionTimeExceeded
Maximum execution time of 4 seconds exceeded. Closing worker.
Method RequestHandler::SlaveClose -> cancelTimer
Method RequestHandler::maxExecutionTimeExceeded
Maximum execution time of 4 seconds exceeded. Closing worker.
Method RequestHandler::SlaveClose -> cancelTimer
Method RequestHandler::maxExecutionTimeExceeded
Maximum execution time of 4 seconds exceeded. Closing worker.
Method RequestHandler::SlaveClose -> cancelTimer
Method RequestHandler::maxExecutionTimeExceeded
Maximum execution time of 4 seconds exceeded. Closing worker.
Method RequestHandler::SlaveClose -> cancelTimer
Method RequestHandler::SlaveClose -> cancelTimer
[06/Dec/2019:07:07:09 +0000] 127.0.0.1 - - "GET /asterisk/connect/ HTTP/1.1" 200 291 "-"
Method RequestHandler::maxExecutionTimeExceeded
Maximum execution time of 4 seconds exceeded. Closing worker.
Method RequestHandler::SlaveClose -> cancelTimer
Method RequestHandler::maxExecutionTimeExceeded
Maximum execution time of 4 seconds exceeded. Closing worker.
Method RequestHandler::SlaveClose -> cancelTimer

Screenshot with response timers and status code from chrome network - https://www.dropbox.com/s/qikg27y9dwkqbep/%D0%A1%D0%BA%D1%80%D0%B8%D0%BD%D1%88%D0%BE%D1%82%202019-12-06%2010.07.55.png?dl=0

Please check it. I expected give response with status code is 200 for all request after ~2 sec delay. But I have 504 after 3ms - 1.62sec delay.

@andig
Copy link
Contributor

andig commented Dec 6, 2019

Did you add the additional logging statements yourself?

@alexpts
Copy link
Author

alexpts commented Dec 6, 2019

Yes, I added 2 extra log Method RequestHandler::SlaveClose -> cancelTimer and Method RequestHandler::maxExecutionTimeExceeded

@andig
Copy link
Contributor

andig commented Jan 10, 2020

Related to #470?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants