Node red crashes frequently

Hi all.

I used node red to prepare a monitoring system for mechanical facilities and condition of productive machines 2 years ago on server system so that other persons in factory could see and use it. I also put node red on start up of windows to be sure that would not be any crashes in system.it worked until 1 years ago without any problem but since 1 year ago it crashes some times( usually once in the week )and I should start again in cmd. I and It team could not find and solve of the problem yet. what could be possible reasons based on your experience and how I could have a log when node red crashes to find the reason?

Thanks for your help in advance

Can you share the logs you captured while you and your IT team were investigating?

TBH, without logs or details, all we can realistically offer you is general advice. In fact, if you search this forum, there are hundreds of posts that describe reasons for crashing. But if you want to really know what's going on, you're going to have to supply logs and details of what your flows do, what hardware, what OS, what contrib nodes, node/node-red versions etc

Thanks dear Steve.
How can I capture the log?
one note-pad window opens in crash situation in windows but I'm not sure that is the related log.
it contains this code:

#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows)
{ # Fix case when both the Windows and Linux builds of Node # are installed in the same directory $exe=".exe" }
$ret=0
if (Test-Path "$basedir/node$exe")
{ # Support pipeline input if ($MyInvocation.ExpectingInput) { $input | & "$basedir/node$exe" "$basedir/node_modules/node-red/red.js" $args }
else { & "$basedir/node$exe" "$basedir/node_modules/node-red/red.js" $args }
$ret=$LASTEXITCODE }
else { # Support pipeline input if ($MyInvocation.ExpectingInput) { $input | & "node$exe" "$basedir/node_modules/node-red/red.js" $args }
else { & "node$exe" "$basedir/node_modules/node-red/red.js" $args }
$ret=$LASTEXITCODE }
exit $ret

Node-RED logs have been covered in the forum many many many times. For me to help you access logs you will need to provide details as I requested

Additionally:

  • What operating system are you running Node-RED on?
  • Is Node-RED running in Docker?
  • How do you start Node-RED?