Skip to content

Conversation

@ttsuru
Copy link

@ttsuru ttsuru commented Mar 12, 2025

  • The timeout value (in microseconds) is now configurable using the BREF_FPM_READY_TIMEOUT environment variable.
  • If the BREF_FPM_READY_TIMEOUT variable is not set, the default timeout is 5 seconds (5000000 microseconds).

ref: #1917

ttsuru added 2 commits March 12, 2025 13:27
- The timeout value (in microseconds) is now configurable using the `BREF_FPM_READY_TIMEOUT` environment variable.
- If the `BREF_FPM_READY_TIMEOUT` variable is not set, the default timeout is 5 seconds (5000000 microseconds).
@indy-singh
Copy link

Any chance of this being picked up?

We need this because we are running into this a lot.

28138e2b-4095-4356-be3e-03c840b2d600	Invoke Error	{
    "errorType": "Bref\\Event\\Http\\FastCgi\\Timeout",
    "errorMessage": "The request 28138e2b-4095-4356-be3e-03c840b2d600 timed out after 2000 ms. Note: that duration may be lower than the Lambda timeout, don't be surprised, that is intentional. Indeed, Bref stops the PHP-FPM request *before* a hard Lambda timeout, because a hard timeout prevents all logs to be written to CloudWatch.",
    "stack": [
        "#0 /var/task/vendor/bref/bref/src/Event/Http/HttpHandler.php(25): Bref\\Event\\Http\\FpmHandler->handleRequest()",
        "#1 /var/task/vendor/bref/bref/src/Runtime/Invoker.php(29): Bref\\Event\\Http\\HttpHandler->handle()",
        "#2 /var/task/vendor/bref/bref/src/Runtime/LambdaRuntime.php(91): Bref\\Runtime\\Invoker->invoke()",
        "#3 /var/runtime/bootstrap(55): Bref\\Runtime\\LambdaRuntime->processNextEvent()",
        "#4 {main}"
    ]
}

In our case the upstream HTTP POST can take around 3-4 seconds and a hard stop of 2 seconds (the lambda is 10 seconds) is causing false alerts on our monitoring,

Cheers,
Indy

@mnapoli
Copy link
Member

mnapoli commented Mar 19, 2025

Hey, sorry for the delay. I will review this but not this week unfortunately, this is a launch week + I'm moving to a conference talk so only focusing on urgent bugfixes. But I'll get back to this ASAP 👍

@indy-singh
Copy link

@mnapoli Any update on this?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants