My nextjs app is running on docker (which is being managed by coolify/traefik proxy).
I'm stress testing my app using another vps using following command and result is:
wrk -t12 -c400 -d60s [mywebsite]
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.49s 366.80ms 1.96s 63.12%
Req/Sec 25.85 38.56 220.00 86.26%
5479 requests in 1.00m, 254.82MB read
Socket errors: connect 0, read 396, write 0, timeout 4728
Requests/sec: 91.17
Transfer/sec: 4.24MB```
Lots of timeouts and app is not usable when i try to access it when stress testing happening.
I `htop` on target server, my ram usage is 1.7gb/8gb, my 4 cpu cores are at around 40%~.
So I don't think the issue is server resources as you can see.
What can be the issue then?