Increase default request timeout for Adonis 5 #3977
-
Hey 👋 Is there a way to increase the default timeout (Error code 504) with Adonis 5? It's probably a setting to change somewhere, but I can't find it. I have a query that takes between 2 and 3 minutes to complete before responding. In Adonis 4, it was something close to this.
|
Beta Was this translation helpful? Give feedback.
Answered by
thetutlage
Nov 16, 2022
Replies: 1 comment 2 replies
-
You can do the same thing with v5. Write the following code within the public async ready() {
if (this.app.environment === 'web') {
this.app.container.use('Adonis/Core/Server').instance!.timeout = 0
}
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
LeCoupa
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can do the same thing with v5. Write the following code within the
AppProvider
of your app.