Skip to content
Back

Functions Failing Due to Installed Dependencies, Even Without Being Used

  • 0
  • React Native
  • Functions
Saiki
9 Jul, 2025, 23:10

Hi team! Before anything, I am on the so far while we're in the planning phase of the app, and will be upgrading to pro soon. If there's a possibility that this is what's causing the issue below, please let me know.

I’m running into an issue deploying a Python function in Appwrite Functions. The function is intended to run an ML model called DeepSkin, which is used for wound segmentation and PWAT scoring for a healthcare client. This model requires the following dependencies:

TypeScript
numpy  
mahotas  
opencv-python  
tensorflow>=2.8.0  
gdown  
git+https://github.com/Nico-Curti/Deepskin.git

The problem is not with my code, I’ve confirmed that everything runs fine without these dependencies. But once I include them (especially tensorflow, I suspect), I start encountering issues even when the function body just returns "hello world". In my build commands, I use pip install -r functions/requirements.txt to install these dependencies.

Specifically: • The function builds fine, although it takes over 6 minutes each time I rebuild. • But on cold start, I get: Function timed out during cold start. Error Code: 400 • If I increase the timeout, I get: Synchronous function execution timed out. Use asynchronous execution instead, or ensure the execution duration doesn't exceed 30 seconds. Error Code: 408

Again, none of the heavy ML logic is being executed yet, just simply running the function with these dependencies being installed seems to be the issue.

Is there anything I can do? I really don't want to go back to using FastAPI, and these serverless functions were one of the main reasons I came to you guys. Any help would be appreciated!

Thanks!

TL;DR
Developers facing issues deploying a Python function in Appwrite Functions due to installed dependencies causing timeouts even without executing ML logic. The function builds fine but times out on cold start, likely due to heavy dependencies like TensorFlow. Solution: Consider optimizing dependencies, using asynchronous execution, or seeking assistance from the platform provider.
Saiki
9 Jul, 2025, 23:18

Also it's really urgent so any help would be appreciated.

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