Beanstalk connection handling