Can my Windows Service app crash a remote computer?

Coreysan 1,811 Reputation points
2024-10-10T05:01:26.25+00:00

I have a question about a server crash.

 I have a Windows service running on a web server, I'll call "Server1". It updates a database on a different server (MS SQL Server), I'll call "Server2".

 Server2 also hosts the Microsoft SSRS Reporting Service.

 Here's my question: when my service runs, it updates Server2, all indications are that it runs just fine, no errors of any kind, and then completes. However, about 15 minutes later, Server2 crashes. I've checked error codes, try/catch conditions, and the service launches a few stored procs on Server2, but I don't see any problems (they only run for 1 minute, and the return from execute.nonquery is always 0.

 Can there be any causal link between running a service on one server that harms a different server? Any cause at all?

 I have no reason to suspect my C# service has any known bugs. When the timer event executes, it just calls a class that runs several methods, and those methods update the database on Server2 with standard C# SqlConnection code. Again, I see no errors at all.

 

But it concerns me that when it runs and completes, Server2 crashes 15 minutes later. Its possible there is no causal link, but it really seems too coincidental.  

Any thoughts?

 My Service basically does this:

         private void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)

        {

                                int ireturn = PerformDataBaseOperations();

                                 timer.Interval = 3600000; // 1 Hour

         }

 The PerformDatabaseOperations is just sending some data over to Server2, and updating 2 tables.


This email was scanned by Bitdefender

Developer technologies | .NET | Other
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2024-10-10T05:59:24.3233333+00:00

    Hi @Coreysan ,Welcome to Microsoft Q&A,

    First of all, we can't reproduce your problem, so we can only make wild guesses.

    Your service may inadvertently create a situation that causes resource exhaustion or deadlock on Server2. Even if you don't see any immediate errors, long-running transactions, blocking, or locking in SQL Server may accumulate over time and eventually overwhelm the server and cause it to crash.

    If the operation of your service or other processes causes excessive writes or growth to the TempDB database (used for temporary data storage in SQL Server), this can eventually cause the server to crash when space is exhausted or fragmentation becomes severe.

    Check the TempDB configuration and look for any rapid growth in file size. Ensure that there is enough disk space and consider setting up an alert for TempDB size growth.

    While the service itself might not show any errors, SQL Server logs or Windows Event Viewer on Server2 might provide clues about what happens before the crash. Look for any critical errors, warnings, or unusual behavior in the logs.

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.