Self-hosted 1.9.0 — what's the canonical way for functions to call the Appwrite API on the same host
- 0
- Self Hosted
Self-hosted 1.9.0 — canonical way for functions to call the API on the same host?
Setup: Go functions on self-hosted 1.9.0. Public domain via traefik, valid LE cert. APPWRITE_ENDPOINT=https://my.example.com/v1 (auto-injected APPWRITE_FUNCTION_API_ENDPOINT resolves to the same public value).
Problem: functions that fan out 5–6 parallel ListDocuments via errgroup hit 15 s OpenRuntimes gateway timeouts under burst. 4 calls finish in 10–60 ms, 1–2 hang. Error on the hung ones:
Get "https://my.example.com/v1/tablesdb/.../rows": context deadline exceeded (Client.Timeout exceeded while awaiting headers) Sequential single calls always succeed in tens of ms — so it's the public-hostname HTTP path under burst, not MariaDB.
Probe from inside the runtime container:
appwrite (container name) → DNS 10.0.0.26, TCP ok, but GET /v1/health returns the Console HTML SPA, not JSON appwrite-traefik, traefik → DNS fails (different network) public hostname → JSON, but throttles under burst (hairpin) Q: What's the supported way for a function to call /v1/* on the same host without hairpinning out via the public domain?
Is there an internal endpoint that serves /v1/* as JSON regardless of Host header? Or should I set APPWRITE_ENDPOINT=http://appwrite/v1 and override the SDK's Host header to _APP_DOMAIN? Any helper for that? Or attach runtimes to a network where appwrite-traefik is reachable, so I can use http://appwrite-traefik/v1? Or is the official guidance to avoid burst-parallel SDK calls inside a single function execution? I have full step traces + durations confirming it's the HTTP callback path, not the queries. Thanks 🙏
Recommended threads
- Function executions via custom domain fr...
Aplogies if this was asked already. I'm self-hosting 1.9 on a self-hosted instance of Dokploy. I've made the necessary adjustments to the original compose file ...
- Running into a server error on my self-h...
Hey everyone, I'm running into a server error on my self-hosted setup after updating to v1.19.0. The issue only happens during user creation and deletion. Ever...
- Storage System
Hey guys, quick question regarding massive storage scaling. I’m working in digital forensics and I’m constantly dealing with huge binary disk images, usually be...