Back

Function deployment always fails after 10 minutes

  • 0
  • Self Hosted
  • Functions
Triple Gelato
1 Dec, 2023, 18:28

I've tried with github deploy now and it's the same situation

TL;DR
Function deployments are failing after 10 minutes even though the timeout configuration is set to 900 seconds. It seems like increasing the CPU speed resolves the issue, but it's not an ideal solution due to increased hosting costs. There is a suggestion to check if the timeout value is being ignored and if there is an alternative way to verify it. The output of `docker ps -a` after a failed build may provide more information. The version of Appwrite being used is 1.4.13.
Triple Gelato
4 Dec, 2023, 12:34

Anyone can help with this?

Drake
4 Dec, 2023, 12:41

What's the output of docker ps -a right after failed build?

Triple Gelato
4 Dec, 2023, 17:02
Drake
4 Dec, 2023, 18:59

Hmm... The container isn't exiting...I wonder if it's really timing out....i know it takes like 5 minutes on cloud. It could be taking even longer on a lower spec machine

Triple Gelato
4 Dec, 2023, 19:52

Is there anyway to verify that? Or only way is to increase RAM or CPU on the machine?

Triple Gelato
5 Dec, 2023, 19:13

Anyone?

Drake
5 Dec, 2023, 19:58

That depends on your provider. Usually they allow you to increase the specs on your VPS

Triple Gelato
6 Dec, 2023, 15:39

There's no option to update RAM only so I tried a faster CPU, then the deployment finishes within 8 minutes without issue. So I'm guessing there must be a timeout set somewhere with _APP_FUNCTIONS_BUILD_TIMEOUT being ignored

Triple Gelato
7 Dec, 2023, 17:00

Possible to look into this issue? The hosting costs are significantly higher with the faster CPU

Drake
7 Dec, 2023, 20:54

What version of Appwrite do you have?

Triple Gelato
7 Dec, 2023, 20:55

1.4.13

Drake
8 Dec, 2023, 08:47

I looked through the code and it should be using that build timeout that defaults to 15 minutes. I'm not sure why it's ending at 10 minutes

Triple Gelato
8 Dec, 2023, 11:32

I've tried to lower to 1 CPU with 1 GB RAM and deploy again, it ends at 10 minute mark again. But according to usage graphs RAM usage is just around 80% so doesn't seem like out of memory issue.

Triple Gelato
18 Dec, 2023, 11:23

Can anyone help with the timeout issue?

Drake
18 Dec, 2023, 21:54

Help how? Your server needs more resources

Triple Gelato
18 Dec, 2023, 22:18

Help in fixing that it’s not using the correct timeout configuration? I’m fine with longer deploying times but appwrite isn’t respecting the config value and terminating early.

D5
18 Dec, 2023, 22:53

Maybe there's something wrong with your function code so due to that it doesn't gets deployed?

Triple Gelato
18 Dec, 2023, 22:56

If I use a better CPU to make it compile faster (less than 10 minutes) then it gets deployed without problem

Triple Gelato
18 Dec, 2023, 22:57

The issue here is the environmental config value for deployment build timeout isn’t being respected.

Drake
18 Dec, 2023, 23:20

Would you please create an issue?

Drake
18 Dec, 2023, 23:21

for reproduction steps, you can put...

Drake
18 Dec, 2023, 23:23
TypeScript
0. Ensure `_APP_FUNCTIONS_BUILD_TIMEOUT` is set to 900 (seconds)
1. Create a starter function
2. Update the build command to `sleep 720`
3. Create a deployment
Drake
20 Dec, 2023, 02:20

@Triple Gelato have you had a chance to create the issue?

Triple Gelato
22 Dec, 2023, 07:19
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