So why not enable debug mode and detailed errors and see what's the exact error?
Every time you have errors I give you this link:
And every next time you never enable the debug mode... This is the first thing to do when you have server connect errors, we explained this like thousands of times in the last 3 years.