#Stress testing self hosted nextjs

1 messages · Page 1 of 1 (latest)

junior roost
#

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?
bold cipherBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)