Crash of the background worker because of the SQL connection

I have a background worker running on some machine, which getting random crashes because of the SQL connection. Would the background service behave the same with lost SQL connection as with SQL server restart? I tried disabling connection before the start or during the processing, but it doesnt crash in any of those cases. Is there a way that the service behave differently if SQL server got restarted? (I cant test that) This are the two errors I am getting: - Error Number:10054,State:0,Class:20 - Microsoft.Data.SqlClient.SqlException (0x80131904): SHUTDOWN is in progress. Login failed for user 'user\password'. Cannot continue the execution because the session is in the kill state. A severe error occurred on the current command. The results, if any, should be discarded.

Looking for more? Join the community!