Hey guys, just a quick one - we had some web traffic the other day and it ended up bombing out -
To put in perspective of how the app works, we have a Nuxt Application with Nitro endpoints that handle majority of the Appwrite lookups, it has a shared singleton client, that gets used across database lookups, but yet we still saw a lot of timeout issues, and overloading on to the Appwrite side of things, causing our lookups to fail, even though we lightly cache certain routes for users.
Is there something I'm missing for handling mass amounts of traffic, and are there perhaps some recommended steps to take to get this working as best we can.
We saw things like:
- cause: ConnectTimeoutError: Connect Timeout Error
- ConnectTimeoutError","stack":"ConnectTimeoutError: Connect Timeout Error\n at onConnectTimeout (/app/.output/server/node_modules/node-fetch-native-with-agent/dist/shared/node-fetch-native-with-agent.df7e6bd6.cjs:1:43536)\n at /app/.output/server/node_modules/node-fetch-native-with-agent/dist/shared/node-fetch-native-with-agent.df7e6bd6.cjs:1:42805\n at Immediate._onImmediate (/app/.output/server/node_modules/node-fetch-native-with-agent/dist/shared/node-fetch-native-with-agent.df7e6bd6.cjs:1:43220)\n at process.processImmediate (node:internal/timers:504:21)
- a multitude of fetch errors/failed etc.
Our Appwrite is running on a well spec’d bare metal server, and we have Cloudflare infront of it.
But when a mere 100 users all hit the app at the same time for an event going live at a certain time, we saw all these issues come in and bottleneck the app.
Any suggestions, ideas, etc are all welcome!
there can be multiple things :
- your server can't handle that many websocket (not likely if your server is big enough and/or running on a cluster)
- appwrite services are maybe overloaded (container limits, or maybe a default configuration that is too low for that many users)
- the database could have too many connections opened (and then possibly fails to open the websocket)
Could you check the appwrite containers (API, Realtime and maybe the Workers) to see if any have error logs inside them, if yes paste them here.
- in case it's the database not allowing the connection, with maria you can increase the
max_connectionsto like1000 - in case it's the appwrite service itself you could maybe try to duplicate the container (they are stateless microservices so they can be replicated, in my setup i have 2 API, 2 Realtime, 2 Console, and some workers are also replicated, just in case on of my node is down)
mmm ok running multiple coule be interesting - it all runs through docker compose, so we could look in to that - max_connections is another interesting point. ill scan the logs and see where we're at
Recommended threads
- 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...
- Functions executed by events does not ap...
Hello, Running self-hosted Appwrite version 1.9.0 (with console 7.8.26). When functions are triggered by an event (eg. databases.\*tables.\*.rows.\*.create) doe...