Added cmin and cmax to control client pool. Deadlock now happens more
quickly in standalone mode.