Nginx http2 - browser creates new connection even after a few seconds idle

60 Views Asked by At

I have a NGINX server running with http2 that serves my REST API.

Works great for concurrent requests.

But if there is even just a few seconds between request then the browser creates a whole new connection including ssl handshake and all that just makes things feel slower.

Under http1.1 you could use a keepalive_timeout setting but i can't find the equivalent for http2.

How to make the server and client keep the connection for at least a minute?

1

There are 1 best solutions below

2
user28906 On

Solved - It looks like the reason was that my computer was low on memory.

Works perfectly after cleaning up some leaking processes.

Makes sense that you don't have many open connections if you are low on memory.