I am working with a log analytics tool called Splunk, which executes a Powershell script and stores the output.
The script execution takes pretty long time and the output is around 100MB+ when the script completes the execution.
When I check the log of the script, I found out that the execution was paused and continued after around an hour!
After looking at the question about QuickEdit mode of the Powershell console metioned here, There are 2 possible reasons why this can happen:
If the QuickEdit mode of the Powershell console is On, and if there are any selected words or area in terminal. But, this is not the case, as the Powershell is invoked as a background process
If the
stdout
throughput is too much than the host console can handle. Possible reason as the output of the script is very large as mentioned.
Note: there is no sleep
or stdin
expected in the powershell script as it is meant for collecting performance metrics.
What is the exact reason of the hang of the process in this case, (from 2 mentioned about or any other) and how can I prevent it?