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!
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.
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?
Exact same "Timed out waiting for runtime" problem here right now. 😞 It was stable for months. I wonder what happened. 🤔
<@1329045306997866509> Thanks for the resources, rly appreciate it!
<@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 🙂
Increase Resource limit to 1CPU 1GB RAM
Tried that, even at 4gb ram and 4 cpu's it still errors out.
After resource update, you need to redeploy...
Recommended threads
- Why does this happen?
`AppwriteException: general_argument_invalid, Invalid `secret` param: Value must be a valid string and at least 1 chars and no longer than 256 chars (400)` the...
- Selfhosted starter python function retur...
I am running a selfhosted appwrite instance. Creating a node function and executing it works just fine but when i try to execute a python starter function, i ge...
- Database Write Limits hit
Hello Appwrite Admins, I'm a GitHub Education user, and about a week ago, my database was really badly optimized, resulting in about 600k writes in a single day...