0
I have a PC running Windows 8 running continuously and performing PowerShell-scripted tasks. The scripts are called by starting PowerShell and passing the scripts' names from a batch file which in turn is regularly executed by one of the processes.
Over the course of several days, I can observe the system's free memory decreasing, although a record of the running processes' memory via Get-Process does not show any suspicious behavior of any process. Strangely though, whenever I log in via remote desktop, the memory seems to get cleaned up and the free memory again corresponds to the observed process usage.
This is a "real" phenomenon, whenever I allow the memory to be flooded entirely, some processes terminate due to lack of memory.
Unless, of course, I login regularly via remote desktop, which is unpractical to do regularly.
What could be the reason for this phenomenon? How can I avoid this flooding without having to log in regularly?
Many thanks in advance
do you have a singe, continuously running cmd or powershell session, or are you using something like Task Scheduler to start new ones? Are you using variables? – user19702 – 2019-04-24T13:17:01.267
Each time the script is run, a new cmd (and from this, a powershell) session is invoked by a third-party program (not the Windows task scheduler, but similar in principle). However, the script first checks a lockfile, to ensure that the previous script has terminated properly. And yes, variables are used in the powershell-script. – haarigertroll – 2019-04-24T14:02:28.563
If you RDP in as a different user, does your ram usage still go back to normal? if the third-party program is what's crashing, does it have a memory limitation like heap size you can change? – user19702 – 2019-04-24T14:21:57.683
Sorry for the long delay in answering - I have limited control over the machine, as it has come bundled with said third party software and has been preconfigured. Meaning that I can't manage user accounts. As for the software, it is a data acquisition tool for electronic sensors. My guess is that it crashes whenever it has to use the slower paged memory, but the error messages are cryptic enough to confuse even the vendor support. That's why I assume the problem to be rather with Windows than the software itself. – haarigertroll – 2019-04-30T07:04:40.383
Does the vendor have a support/admin account they could try the same thing with? Ideally you can determine whether the issue is at a user or system level this way. Try using Performance Monitor counters to see exactly which memory pools are giving you trouble, then you may be able to troubleshoot further. – user19702 – 2019-05-01T13:57:47.127