Server response time slow
Unanswered
Checkered Giant posted this in #help-forum
Checkered GiantOP
I got a vps, installed nginx on it and put my next.js 15 project. Everything is fine until the first request. Every time you try to access my site, the server response is 1-2 seconds. After you enter the site, everything works instantly, even refresh without cache. I searched the internet and chatgpt, gemini but I can't find a solution or where the problem is exactly. From the tests done, accessing the site from localhost directly through the application resulted in a time of 0.002 seconds and through nginx localhost it was 0.04 seconds.
Another test done in cmd on my laptop this time is this:
time_namelookup = 0.0487s (DNS resolution)
time_connect = 0.0521s (TCP connection establishment)
time_appconnect = 0.1292s (TLS/SSL handshake completed)
time_starttransfer= 1.3182s (server started sending data)
time_total = 1.3186s (all time until response completion)
Have you had this problem? How could I solve it? I'm a beginner, I've been learning next.js for a maximum of 2 weeks. Thank you.
website: https://cosminfrai.ro
Another test done in cmd on my laptop this time is this:
time_namelookup = 0.0487s (DNS resolution)
time_connect = 0.0521s (TCP connection establishment)
time_appconnect = 0.1292s (TLS/SSL handshake completed)
time_starttransfer= 1.3182s (server started sending data)
time_total = 1.3186s (all time until response completion)
Have you had this problem? How could I solve it? I'm a beginner, I've been learning next.js for a maximum of 2 weeks. Thank you.
website: https://cosminfrai.ro