bref
bref copied to clipboard
feat: Allow configurable timeout via environment variable
- The timeout value (in microseconds) is now configurable using the
BREF_FPM_READY_TIMEOUTenvironment variable. - If the
BREF_FPM_READY_TIMEOUTvariable is not set, the default timeout is 5 seconds (5000000 microseconds).
ref: #1917
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
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 👍
@mnapoli Any update on this?