Adjusting pool sizes to prevent socket errors