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

[🐛 BUG]: RR doesn't respect http.pool.allocate_timeout #1226

Closed
1 task done
Warxcell opened this issue Jul 25, 2022 · 7 comments · Fixed by roadrunner-server/sdk#38
Closed
1 task done

[🐛 BUG]: RR doesn't respect http.pool.allocate_timeout #1226

Warxcell opened this issue Jul 25, 2022 · 7 comments · Fixed by roadrunner-server/sdk#38
Assignees
Labels
B-bug Bug: bug, exception F-need-verification Y-Release blocker Priority: Release blocker
Milestone

Comments

@Warxcell
Copy link

Warxcell commented Jul 25, 2022

No duplicates 🥲.

  • I have searched for a similar issue in our bug tracker and didn't find any solutions.

What happened?

I have

http:
    address: ${HOST}:${PORT}
    pool:
        debug: ${RR_DEBUG}
        num_workers: ${RR_WORKERS}
        max_jobs: 0
        allocate_timeout: 120s

but it tells

php 2022-07-25T13:53:05.610Z    ERROR    http            execute    {"start": "2022-07-25T13:52:05.602Z", "elapsed": "1m0.007540715s", "error": "failed to spawn a worker, possible reasons: https://roadrunner.dev/docs/known-issues-allocate-timeout/2.x/en"}

elapsed is 1m, so it doesn't respect 120s (2m)

and there is a typo in the docs: https://roadrunner.dev/docs/http-available-middleware/2.x/en

it should be http.pool.allocate_timeout not pool.allocate_timeout.

Version (rr --version)

2.11.0-beta.1

Relevant log output

php 2022-07-25T13:53:05.610Z    ERROR    http            execute    {"start": "2022-07-25T13:52:05.602Z", "elapsed": "1m0.007540715s", "error": "failed to spawn a worker, possible reasons: https://roadrunner.dev/docs/known-issues-allocate-timeout/2.x/en"}
@rustatian
Copy link
Member

Hey @Warxcell 👋🏻
The workers' pool is not an http plugin property.
But allocate_timeout is the property of the pool. It can be jobs.pool.allocate_timeout, http.pool..., grpc.pool..., etc. Thus in the docs, we used a more general term, pool.allocate_timeout.

@rustatian
Copy link
Member

Regarding the first part of the issue, about allocate_timeout not taking into account, I'll have a look; Thanks.

@rustatian rustatian added the Y-Release blocker Priority: Release blocker label Jul 25, 2022
@rustatian rustatian added this to the v2.11.0 milestone Jul 25, 2022
@rustatian rustatian changed the title [🐛 BUG]: RR doesn't respect http.pool.allocate_timeout [🐛 BUG]: RR doesn't respect http.pool.allocate_timeout Jul 25, 2022
@rustatian
Copy link
Member

@Warxcell Is this all configuration? Might be you have a supervisor section?

@Warxcell
Copy link
Author

This is whole conf:

version: "2.7"

server:
    command: "php /app/server.php"
    relay: "unix:///tmp/rr.sock"

http:
    address: ${HOST}:${PORT}
    pool:
        debug: ${RR_DEBUG}
        num_workers: ${RR_WORKERS}
        max_jobs: 0
        allocate_timeout: 120s
    middleware: [ "http_metrics", "static", "sendfile", "gzip" ]
    # Settings for "static" middleware (docs: https://roadrunner.dev/docs/http-static).
    static:
        dir: "/app/public/"
        forbid: [ ".php" ]
        calculate_etag: false
        weak: false

rpc:
    listen: tcp://127.0.0.1:6001

logs:
    mode: ${RR_LOGS}
    output: stderr

metrics:
    address: 0.0.0.0:8080

@rustatian
Copy link
Member

Could you please try to use relay: pipes?

@Warxcell
Copy link
Author

Could you please try to use relay: pipes?

Yeah, with pipes it seems to work.

@rustatian
Copy link
Member

Nice. I fixed the issue for the sockets/tcp. It will be later today in the beta.2.

@rustatian rustatian mentioned this issue Aug 18, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: bug, exception F-need-verification Y-Release blocker Priority: Release blocker
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants