Home > Net >  C # service programs lead to computer crashes
C # service programs lead to computer crashes

Time:11-27

C # Windows service program, is a GPS positioning data server
Jammed server computers, accidental happening is CPU instantly ran full, mouse and keyboard response, must press the power button to turn off the server,
Formulating rules for return, common the program running, large probability will start only after just restart the server, open the application CPU instantly ran full computer crashes,

Using multi-threaded added sleep, don't know is what reason, hope each great god correct

CodePudding user response:

Just starting, many rely on services and the environment is not ready to

So at this time if not check, there are plenty of exceptions, and then retry,

Such as GPS, haven't even get to the Internet that how make? A lot of abnormal retry, where (true)

CodePudding user response:

reference 1st floor wanghui0380 response:
just boot, many rely on services and the environment is not yet ready to

So at this time if not check, there are plenty of exceptions, and then retry,

Such as GPS, haven't even get to the Internet that how make? A lot of abnormal retry, where (true)


Not just restart, is every time after restart the server might happen this situation,
Determine the operating system has begun to normal system start good open every few hours after the application is also appear this problem

CodePudding user response:

You want to find out why, use whatever means, the log file, the program loop body, asynchronous listener, conditions permitting, their machines running day and night, call logs, understand the reasons, just have the corresponding solutions,

CodePudding user response:

If the server CPU core number is more, the service is multithreaded, if the code USES a lot of the Lock, prone to life and death Lock, once a deadlock CPU usage to 100% at the meeting, once wrote a service is used to receive the network data, the Lock doesn't work good happened such problems, in the ordinary machine core CPU (4) no problem, deployed on the server (double road, 24 core) is often a deadlock occurs, then remove some unnecessary Lock, and solved the problem after the Lock with the Monitor,

CodePudding user response:

Program in what circumstances will make cpu100 %
  •  Tags:  
  • C#
  • Related