Windows Agent hangs when RAM is Full until Service is restarted manually

Hi

I can’t guarantee that the Windows Agent will work correctly if the RAM is low.
This use case was never tested or assigned for testing.

About the overflown queue.

There two threads to process connection in WIndows agent
Thread number 1 is accepting incoming connection and place this connection on a shared queue.
Thread number 2 is picking up constantly a first connection from the queue and process it.
In the log you could see something like

2022-08-03 13:36:17.750 [app 40200] Connected from '127.0.0.1:51476' ipv4 -> queue
2022-08-03 13:36:17.750 [app 40200] Connected from '127.0.0.1' ipv4 port: 51476 <- queue

First line is produced by the first thread
The second one - by the second thread

In your case, the second thread just sit in the hang state. Probably (highly probably) because of internal error due to the lack of memory.
Just FYI, Windows agent may require a LOT of RAM, because of

  • Win32 API may require megabytes(temporary)
  • external plugins may require hundreds of megabytes(PowerShell or python)
  • spawned own process to gather perf data requires at least 10-20 MB.

I would suggest

  • increase RAM (if it is possible)
  • increase seriously pagefile size(it is always possible)
  • if you are using 32-bit Windows, then switch ASAP onto 64 bit: Lack of address space is not solvable.
  • check windows eventlog for strange events
  • enable crashing monitoring to see whether windows agent crashes

Regards,
Sergej Kipnis