Implement queueing for in-memory backend
Teardown dead connections better