fix bug: random exception happened when there are over 200 connections