How do I prevent Socket/Port Exhaustion?

前端 未结 5 1974
被撕碎了的回忆
被撕碎了的回忆 2020-12-09 04:56

I am attempting to performance test a website by hitting it with requests across multiple threads. Each thread executes n times. (in a for loop)

However, I

5条回答
  •  醉酒成梦
    2020-12-09 05:36

    It's not an issue of closing sockets or releasing resources in your app. The TIME _WAIT is a TCP stack timeot on released sockets to prevent their re-use until such time as it is virtually impossible for any packets 'left over' from a previous connection to that socket to not have expired.

    For test purposes, you can reduce the wait time from the default, (some minutes, AFAIK), to a smaller value. When load-testing servers, I set it at six seconds.

    It's in the registry somewhere - you'll find it if you Google.

    Found it:

    Change TIME_WAIT delay

提交回复
热议问题