Use semaphore to limit number of concurrent connections