Closing connections based on 'max_connections' argument