explicitly set the server connections to see if that helps mitigate the Connection issues when running rake tasks.
few more site settings