Back

Functions Error: Function timed out during cold start. Error Code: 400

  • 0
  • Self Hosted
  • Functions
Tanner Meade
20 Feb, 2025, 00:38

I'm trying to get v1.6.0 deployed to a single linode 2GB instance. It's using docker swarm right now (just trying to get it working with 1 node/server). I've got it running except when I try to run a cloud function it timesout with the error Functions Error: Function timed out during cold start. Error Code: 400. I've trimmed the function down to just returning hello world. It works on another instance of v1.6.0 appwrite with the function being deployed the same way (appwrite CLI) so I'm pretty sure it's not the code.

The docker container for the function does get created. The logs are:

TypeScript
Starting ...
HTTP server successfully started!```

The executor container has the error:
```[Error] Type: Exception
[Error] Message: Function timed out during cold start.
[Error] File: /usr/local/app/http.php
[Error] Line: 1229```

The appwrite container doesn't have errors related to the function failing. The entrypoint is the same as the instance where it runs perfectly (it's a dart function so it's `lib/main.dart`).

I've compared the .env and docker_compose.yml to the one that results in the standard appwrite self hosted install command. I've attached both with some of the info removed (the passwords and such were working on a previous instance of appwrite so pretty sure it's not them).

Any ideas?
TL;DR
Issue: Function timed out during cold start when trying to run a Cloud Function in Appwrite v1.6.0 deployed on a Linode 2GB instance using Docker Swarm. Troubleshooting: - Confirmed all services are running. - Examined containers via `docker container inspect [id]`. - Verified the function is reduced to just returning "hello world" and works on another instance of v1.6.0 appwrite. - Docker container for the function is created successfully. - Error message in executor container states "Function timed out during cold start." - Appwrite container does not show errors related to function failure.
Tanner Meade
20 Feb, 2025, 00:46

All services in the stack are running and I haven't found anything that I can identify by looking throught the containers via docker container inspect [id]

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