Back

[SOLVED] Timeout not applied correctly

  • 0
  • Cloud
Marius Bolik
3 Dec, 2023, 11:07

Hello Appwrite Community,

I set the timeout to 15 seconds on Appwrite Cloud, but the result still shows 5 seconds. Is this a bug or is it intended?

Kind Regards, Marius

TL;DR
The user had a question about the timeout on Appwrite Cloud. They set the timeout to 15 seconds but the result still shows 5 seconds. The community member explained that the timeout shown in the browser is not the same as the function timeout. They also mentioned that the keep alive timeout is a header for browsers to know when to hang up a request. The solution suggested was to change the number of timeout by sending a third parameter in res.send or res.json. Another community member asked if the user is running it in async. There is no clear resolution to the issue mentioned in the thread.
D5
3 Dec, 2023, 11:56

Are you running it in async?

Meldiron
3 Dec, 2023, 12:17

Hey there πŸ‘‹ Keep alive timeout is a geader for browsers to know when to hang up a request I believe. Appwtite isnt touching any headers so you have full freedom in what you build. My guess would be that this header comes vy default in http server library that we used to build runtime you are using.

To change this number, in res.send or res.json you can send 3rd parameter, which is object of all response headers you want and their values.

Timeout in function settings more connected to internal communication itself - allows you to ensure max durstion if 1 execution to let you better control usage (will be very useful when pricing is introduced on cloud)

Marius Bolik
3 Dec, 2023, 12:49

Yes it runs in async, is this correct?

D5
4 Dec, 2023, 18:28

As Matej explained, the timeout being shown in the browser is not at all the function timeout

Marius Bolik
4 Dec, 2023, 18:41

Thank you. Please mark as solved!

Drake
4 Dec, 2023, 18:59

Btw, you can edit the title of your posts as well

Drake
4 Dec, 2023, 19:00

[SOLVED] Timeout not applied correctly

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more