Multiple Connection from Same IP slow

We have host couple thousand sites and in our office we are constantly checking sites, etc. Every once in a while sites become really slow, but only in the office. After a couple sec they speed up.

Netstat does show TIME_WAIT on the office ip.

I am wondering if I am hitting a limit for source ip. I am not limiting connection on haproxy.

Does anybody have advice on what to check?

Check your kernel settings, what is net.ipv4.tcp_tw_reuse and net.ipv4.tcp_tw_recycle set to?

net.ipv4.tcp_tw_recycle must be 0 (disabled).
net.ipv4.tcp_tw_recycle is bad.

Again, net.ipv4.tcp_tw_recycle is bad,

More about this from Vincent Bernat:

Hello @lukastribus

Yes it’s turned on, not sure why we would of turned it on.

net.ipv4.tcp_tw_recycle= 1