Hi team,
For some actions, we are required to handle a lot of things that need time, and these specific actions can take up to more than 2 minutes.
Because the browser is not receiving an answer in time, we are getting a timeout on the browser side, while the action is still running on our server.
Would it be possible to setup something that prevents the browser to generate a timeout? Is there some existing parameter for that kind of issue?
Thanks in advance for your help.
My current setup:
"meta": {
"database_type": "postgres",
"liana": "forest-express-sequelize",
"liana_version": "6.3.11",
"engine": "nodejs",
"engine_version": "12.13.1",
"framework": "express",
"framework_version": "^4.17.1",
"orm_version": "4.44.0"
}
Hi @Louis-Marie,
Thank you for sharing your issue with us, I’ve got a few questions to get the context in which this timeout issue is happening.
- What browser are you experiencing the issue on?
- How long is the action taking? Only 2mn or more? (I haven’t been able to reproduce with a 2mn delay on the action)
- Is the action response needed (and helpful) or is that just an action that could run as a background process?
Thank you
I managed to reproduce the issue and there is a way to increase the timeout threshold.
Following this tip you can manually set an express server timeout limit. To to so in your lumber app, go to the server.js
file at the root of your project and just after the server.listen(port);
line add a server.timeout = your_timeout_threshold;
However, I must warn you that this will apply to the all app and it might not be the expected behavior. As you’re trying to perform especially long tasks, you should consider handling those in separated tasks that would run in background, with the smart action only triggering it. And if you ned some kind of stamp to know that the action performed correctly, you can maybe use a third party service that could send a notification through email for example.
I hope that those tips and advises will help, feel free to reach out if you have any other concern
1 Like