Skip to content
Back

Timed out waiting for runtime. Error Code: 400

  • 0
  • Functions
  • Cloud
Valoutino
18 Dec, 2025, 12:47

After setting up my ML project that uses deepface and tensorflow in appwrite functions I get the Timed out waiting for runtime. Error Code: 400. error.

I am using the Python (ML) - 3.11 runtime and am not getting any build errors.

I have tried the following:

  • setting the resource limits to various different options
  • Setting the timeout to 120 seconds.
  • rebuilding with these different settings

However none of these seem to work, and every request errors out with this error after 30 seconds. All help is greatly appreciated. Cheers!

TL;DR
Heavy ML libraries causing timeout error, suggested lazy loading as a fix. Resources shared for lazy loading implementation. Increasing resource limit and redeploying recommended after the update.
Devika
18 Dec, 2025, 14:05

Hey! As per my experience with ML projects, this could be happening because of heavy ML libraries i.e. deepface & tensorflow, which takes comparatively more time than other lightweight libraries for startup. To fix that, you can use lazy loading. See if that works in your case.

Valoutino
18 Dec, 2025, 14:16

Thanks <@1329045306997866509> for your answer! Interesting that the loading of libraries is what causes the issue. I would love to give the lazy loading a try. I'm just not really sure how this would work, as my function is just an inference function that accepts an image and processes it using deepface, then returns the output to the user. Do you perhaps ave any documentation or tutorials about this that you recommend?

memoonlite
18 Dec, 2025, 15:34

Exact same "Timed out waiting for runtime" problem here right now. 😞 It was stable for months. I wonder what happened. 🤔

Valoutino
18 Dec, 2025, 15:52

<@1329045306997866509> Thanks for the resources, rly appreciate it!

Valoutino
18 Dec, 2025, 15:53

<@287571453199777792> i'm gonna give the lazy loading a try one of these days. Will let you know if it works. If you find a solution in the meantime please let me know 🙂

ASHQKING
18 Dec, 2025, 18:39

Increase Resource limit to 1CPU 1GB RAM

Valoutino
20 Dec, 2025, 11:44

Tried that, even at 4gb ram and 4 cpu's it still errors out.

ASHQKING
26 Dec, 2025, 16:53

After resource update, you need to redeploy...

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