coreybutler / node-windows

Windows support for Node.JS scripts (daemons, eventlog, UAC, etc).
Other
2.79k stars 358 forks source link

Service stopped unexpectedly but child node process doesn't #235

Open f-w opened 5 years ago

f-w commented 5 years ago

Once about every 2 months my node windows service crashes unexpectedly, usually at night so it's unlikely to be caused by load. When the service stopped, the child node process continues to run so the web service is not down. This issue is related to #12 except that service crashing unexpectedly is my main concern. Surviving child node process is also nagging because if child process is not killed before service is restarted there is port conflict.

coreybutler commented 4 years ago

Obviously this one is pretty tricky to troubleshoot since I can't recreate a 2 month running process. If folks could post logs (or patterns), that might help.

hassanahmad32 commented 3 years ago

@coreybutler I am able to reproduce this issue. Steps to reproduce this issue as below:

1- Install and start the service. 2- Kill the Windows Service Wrapper process from Task Manager (Don't kill the process tree) 3- Child process is still there which creates issue when we try to start the windows service again.

I have used node version 12.8.0

omardoma commented 2 years ago

I am facing the same issue as described by @hassanahmad32 on Node.js v14.17.6 and could replicate it using his provided steps. Any workarounds for the moment?

MarekUrbanUnicorn commented 1 year ago

We are having same problem, didnt have anything else to do so cheked event wiever found thiss one by Windows Error Reporting at the at time service crashed Fault bucket 2216920277276913017, type 5 Event Name: CLR20r3 Response: Not available Cab Id: 0

Problem signature: P1: ppsuulancelotpps.exe P2: 1.17.0.0 P3: 5517d5b0 P4: mscorlib P5: 2.0.0.0 P6: 62476fa6 P7: 34dd P8: 9a P9: System.IO.IOException P10:

Attached files: \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER2A02.tmp.WERInternalMetadata.xml \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER2A80.tmp.xml \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER2B5A.tmp.csv \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER2BC8.tmp.txt \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER2C08.tmp.mdmp \?\C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_ppsuulancelotpps_26ff6abaf7a619573e291377f67b93445e28ddb_00000000_cab_33e544cd\memory.hdmp \?\C:\Windows\Temp\WER44B1.tmp.WERDataCollectionStatus.txt

These files may be available here: \?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_ppsuulancelotpps_26ff6abaf7a619573e291377f67b93445e28ddb_00000000_383177f3

Analysis symbol: Rechecking for solution: 0 Report Id: 07ee1e39-8bfb-498a-b71a-0e1eb3c87601 Report Status: 268435456 Hashed bucket: 6b989d27fa9f2ca31ec4153f16736d79

Cab Guid: 0

next i tried to find that WER file turns out its a plaintext bu a different format hope i helps Report.txt

MarekUrbanUnicorn commented 1 year ago

Checked process for trigering the error using task manager, also happenes on our system, it seems that this error is caused when service wrapper doesnt exit properly