Allow max_connections settings

Cherry picked from the icehouse branch
Fixes: rhbz#1109890