
I'm using Swift swift-5.8 runtime for Functions. When I run docker locally on my mac, I'm able to successfully compile, and deploy/execute my Swift Functions API.
However, every time that I deploy on Digital Ocean (using the same .env file), the functions stop building at exactly 10 minutes with no crash log. Just regular logs where compilation is unfinished:
[793/949] Compiling bn-586.windows.x86.S
[794/949] Compiling bn-586.linux.x86.S
[795/949] Compiling armv8-mont.linux.aarch64.S
[796/949] Compiling armv8-mont.ios.aarch64.S
[797/949] Compiling armv4-mont.linux.arm.S
[798/949] Compiling armv4-mont.ios.arm.S
[799/949] Compiling aesv8-gcm-armv8.linux.aarch64.S
[800/949] Compiling aesv8-gcm-armv8.ios.aarch64.S
[801/949] Compiling aesv8-armx64.linux.aarch64.S
[802/949] Compiling aesv8-armx64.ios.aarch64.S
[803/949] Compiling aesv8-armx32.linux.arm.S
[804/949] Compiling aesv8-armx32.ios.arm.S
[805/949] Compiling aesni-x86_64.mac.x86_64.S
[806/949] Compiling aesni-x86_64.linux.x86_64.S
[807/949] Compiling aesni-x86.windows.x86.S
[808/949] Compiling aesni-x86.linux.x86.S
[809/949] Compiling aesni-gcm-x86_64.mac.x86_64.S
[810/949] Compiling aesni-gcm-x86_64.linux.x86_64.S
```
I've tried updating my _APP_FUNCTIONS_BUILD_TIMEOUT in .env to be a high value, but the functions still timeout during deploy.
_APP_FUNCTIONS_SIZE_LIMIT=30000000 _APP_FUNCTIONS_TIMEOUT=1800 _APP_FUNCTIONS_BUILD_TIMEOUT=100000 _APP_FUNCTIONS_CONTAINERS=10 _APP_FUNCTIONS_CPUS=0 _APP_FUNCTIONS_MEMORY=2048 _APP_FUNCTIONS_MEMORY_SWAP=2048 _APP_FUNCTIONS_RUNTIMES=swift-5.8 _APP_EXECUTOR_HOST=http://appwrite-executor/v1 _APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes _APP_FUNCTIONS_ENVS=swift-5.8 _APP_FUNCTIONS_INACTIVE_THRESHOLD=60
I used the one click setup for digital ocean.

What are the logs for the openruntimes-executor and appwrite-worker-functions?

You can get them with those commands:
docker compose logs openruntimes-execuror
And
docker compose logs appwrite-worker-functions

# docker compose logs openruntimes-execuror
no such service: openruntimes-execuror
# docker compose logs appwrite-worker-functions
appwrite-worker-functions | [Worker] Worker 0 is ready!
appwrite-worker-functions | Worker functions started
appwrite-worker-functions | [Job] Received Job (658b55366a4530.47515950).
appwrite-worker-functions | Fetched 1 functions...
appwrite-worker-functions | [Job] (658b55366a4530.47515950) successfully run.
appwrite-worker-functions | [Job] Received Job (658b553683a4a0.52328783).
appwrite-worker-functions | Fetched 1 functions...
appwrite-worker-functions | [Job] (658b553683a4a0.52328783) successfully run.
appwrite-worker-functions | [Job] Received Job (658b565da55d70.13691850).
appwrite-worker-functions | [Job] (658b565da55d70.13691850) successfully run.

What's your Appwrite version?

Oh, sorry

1.4.13

I had put execuror instead of executor . My bad 😆

Run:
docker compose logs openruntimes-executor

openruntimes-executor | [574/949] Compiling x509_txt.c
openruntimes-executor | [575/949] Compiling x509_trs.c
openruntimes-executor | [576/949] Compiling x509_set.c
openruntimes-executor | [577/949] Compiling x509_req.c
openruntimes-executor | [578/949] Compiling x509_obj.c
openruntimes-executor | [579/949] Compiling x509_lu.c
openruntimes-executor | [580/949] Compiling x509_ext.c
openruntimes-executor |
openruntimes-executor | [Error] File: /usr/local/app/http.php
openruntimes-executor | [Error] Line: 611

Okay, that probably means something Is wrong with your function code

What does the function code contain?

It's a fairly simple Swift package with an appwrite/sdk-for-swift (4.1.0) dependency. I can try removing code to see if that helps. If this is an issue with the function code, It would be nice if It had a debug message displayed.

When I setup appwrite docker containers on my mac it works fine, but when I'm using digital ocean it just pauses around this point.

Then it could be an issue with the function variables or during deployment. Are you manually uploading the functions or using Appwrite CLI?

I'm using the REST api because I discovered the CLI a bit too late 😂

Oh, I see. I would try deploying with CLI. Happened to me that a function didn't run while deploying it by uploading manually, and after deploying the same with CLI it worked due to entrypoint, etc.

Also it will make it simpler for you to deploy future functions

Alright, I'll give that a shot. I think it would be best to use this CLI anyways. Thank you for responding so fast 😄

Try it and tell me if you manage to solve it

If not, we can continue debugging to see what's failing 😅

There's a known issue with the build timeout: https://github.com/appwrite/appwrite/issues/7318

Thanks for sharing Steven! Does anyone have a fix for this?
D5, I switched to the CLI and I was able to delete a lot of code. Still running into build timeouts, but this was still a great improvement.


Recommended threads
- Login/Logout Issue and Page Display Desp...
Subject: Login/Logout Issue and Page Display Despite System Downtime at app.animtube.xyz Hello Appwrite Support Team, After the domain change I made recently (...
- Using Appwrite along with Twilio - Deplo...
Stuck on Querying user document...
- Error while usining domain
While usining domain and im im messaging tab i see: 500 Internal Error But when i use IP:PORT i see this: (Photo) Where is problem The console looks like t...
