share 1 connection when flushing the db queue instead of opening a lot of connections