Eventstore cache out of memory issue

the

[PID:02880:011 2016.04.01 04:30:50.482 ERROR TFChunk ]
CACHING FAILED due to OutOfMemory exception in TFChunk #2-2
(chunk-000002.000000)

Is just Marsha.AllocHGlobal failing.

Is this a constrained memory environment etc?

No, its a VM with server 2016 core running. And the app doesn’t run nearly large enough to “run out of memory” which lead me to believe it was an unmanaged allocation issue…

But I think I may know the problem now after thinking about it overnight - I think its powershell and start-process. I had an issue a while back where job’s started remotely with powershell Invoke-Command + Start-Process would just disappear after a few hours for no reason.

The only way to start a lasting remote process was to use psexec instead so Im going to try that today and see if its still disappears

Yep - all the problems were just powershell being crappy.
Once I switched to psexec instead of Invoke-Command { Start-Process } the process stays up and I don’t get any more TFChunk errors to boot. So powershell’s remote features must limit the amount of space allowed to children… pretty fantastic /sarcasm