Node red stopped working

Hello, Node Red is shutting down while running. Resource consumption is normal. I couldn't detect any errors. I couldn't find the log records. I am using v3.1.3

Hi, welcome to the forum.

Can you tell us the following:

  • what procedure did you use to install node red?
  • where is node red installed (docker? on a raspberry pi? windows computer? mac?)
  • what version of NodeJs is installed?

@Steve-Mcl This has all the hallmarks of a flimflam valve problem :wink:

1 Like

Hello,

Sorry for the late response.

  • I installed node redi via npm.
  • installed on windows server 2012 R2
  • Node.js version v16.15.1

I hope we can find a solution. When node-red closes, no log file is created and the cmd window closes.

Windows console applications do not log to file (or anywhere) unlike Linux. So you need to do this yourself. How you do this depends on how you start Node-RED.

So, what starts node-red? A service? A start-up script? A scheduled task? Manually via a terminal? Manually via a shortcut?

And which account runs node-red? The same account as logged in or as a separate account (like a service account or reduced privileges account)?

I start it manually on the terminal, through CMD.

In which case:

The terminal should remain open and you will see why it crashes.

If you want it logged to file, you need to redirect output to file.

See this: Node-red Error Log File Location - #4 by Steve-Mcl

1 Like

hello, I still could not solve my problem. It stops for no reason. and Ram usage is increasing. waiting for your help.

Waiting for logs!

Can't help if you don't provide required info.

Okay, I've attached the log. There was a crash at 15:14. Thank you.

nodeRed Log.txt (113.6 KB)

Did you look at the log? There is no evidence I can see that says node-red crashed. There are some errors in your function nodes.

1 Apr 15:14:01 - [error] [function:PulAyıklama_Mak1] TypeError: Cannot read properties of undefined (reading 'urunAdi')
1 Apr 15:14:01 - [error] [function:PulAyıklama_Mak3] TypeError: Cannot read properties of undefined (reading 'urunAdi')
1 Apr 15:14:01 - [error] [function:PulAyıklama_Mak5] TypeError: Cannot read properties of undefined (reading 'urunAdi')
1 Apr 15:14:01 - [error] [function:Makina1_Array_Buffer] TypeError: Cannot read properties of undefined (reading 'length')
1 Apr 15:14:01 - [error] [function:Makina2_Array_Buffer] TypeError: Cannot read properties of undefined (reading 'length')
1 Apr 15:14:01 - [error] [function:Makina3_Array_Buffer] TypeError: Cannot read properties of undefined (reading 'length')

I would start by addressing those issues in your function nodes.

Hello, can you also analyse this log? It looks like a memory error?

<--- Last few GCs --->

[8148:0000001BC06A17B0] 44712747 ms: Mark-sweep 1824.2 (2080.6) -> 1810.5 (2080.6) MB, 2712.8 / 0.0 ms  (average mu = 0.195, current mu = 0.125) task; scavenge might not succeed
[8148:0000001BC06A17B0] 44714030 ms: Mark-sweep 1824.6 (2080.6) -> 1810.6 (2080.6) MB, 867.2 / 0.0 ms  (average mu = 0.242, current mu = 0.324) task; scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF6B7612BCF node_api_throw_syntax_error+175519
 2: 00007FF6B75983A6 DSA_meth_get_flags+64006
 3: 00007FF6B7599762 DSA_meth_get_flags+69058
 4: 00007FF6B803FDD4 v8::Isolate::ReportExternalAllocationLimitReached+116
 5: 00007FF6B802B132 v8::Isolate::Exit+674
 6: 00007FF6B7EACF8C v8::internal::EmbedderStackStateScope::ExplicitScopeForTesting+124
 7: 00007FF6B7EBA26D v8::internal::Heap::PublishPendingAllocations+1117
 8: 00007FF6B7EB72F7 v8::internal::Heap::PageFlagsAreConsistent+3367
 9: 00007FF6B7EA9A27 v8::internal::Heap::CollectGarbage+2039
10: 00007FF6B7E50DC5 v8::internal::IndexGenerator::~IndexGenerator+22565
11: 00007FF6B752B913 v8::internal::interpreter::BytecodeArrayWriter::constant_array_builder+4835
12: 00007FF6B752A2B6 ?Build@?$CTypeInfoBuilder@X$S@v8@@SA?AVCTypeInfo@2@XZ+21718
13: 00007FF6B766E66B uv_update_time+491
14: 00007FF6B766E1B2 uv_run+1266
15: 00007FF6B7640895 node::SpinEventLoop+325
16: 00007FF6B754EE18 v8::internal::interpreter::BytecodeArrayWriter::constant_array_builder+149480
17: 00007FF6B75D4491 node::InitializeOncePerProcess+2897
18: 00007FF6B75D5C95 node::Start+821
19: 00007FF6B73D7E8C AES_cbc_encrypt+124092
20: 00007FF6B8635958 inflateValidate+18712
21: 00007FF8940913F2 BaseThreadInitThunk+34
22: 00007FF896145504 RtlUserThreadStart+52


Yes, something is using lots of memory. First though address the earlier errors. They may not be related but they may be and are relatively simple to fix.

So how should we follow a way to detect what uses this memory. In my project, data from 6 machines is transferred to sql. A single sql node (mssql-plus) is used. Data from 6 machines are kept in a separate array and deleted as they are sent. When I follow, there is not much accumulation in the array.

Show us what the startup log looks like now please. You can put the log level back to info.