We had the same problem, one day out of nowhere it stopped working.
Turned out that 1433 port to the sql server database was blocked.
After whitelist'ing the port it all started working again.
You can tell if port is blocked by using telnet command (an error will appear):
telnet <server name to the sql server> 1433