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
- TOO_MANY_REDIRECTS after temporarily ena...
I am losing my mind over this, I enabled this setting because I was having issues with sites not making links with https. I enabled it, ran into issues, so I di...
- TablesDB `updateRows` returns `database_...
Hi Appwrite team! I’m seeing a strange issue with TablesDB bulk row updates on a self-hosted Appwrite instance. **Environment** - Appwrite self-hosted `1.9.0` ...
- [SOLVED] Realtime Missing Channels
```js useEffect(() => { let subscription: RealtimeSubscription; async function loadChips() { try { const {rows: chi...