added maxconnect limit support