Closed fwininger closed 4 years ago
What is the state after execution? Is it still running(4)?
Yes the state is still running when I go in RDP on the machine.
I know that is a strange bug but I can be occurred some time. It's very difficult to reproduice the bug because when we restart the windows server the problem is solved. It's a minor bug because we run scripts on lot of machines (many thousands) and I estimate that this bug occurs on 1 per 1000 computers.
But I think that it's very important for this gem to implement some timeout, we already have timeout on the winrm part with HTTP timeout, but in this case, the powershell process that monitor the tasks can be stucked and the HTTP timeout are not useful.
So let know if my solution looks interesting or I can work on a better solution to handle this kind of problem.
Thanks
👍 this issue is definitely encountered on a large Windows fleet, and can create a congestion in Sidekiq queues.
Hello @mwrock,
Can you consider this PR?
Thanks !
@fwininger did you want to implement the changes discussed here or should we close this?
@mwrock : we currently use this diff in production and it's work almost well. I want to implement the changes discussed and an other change to configure the <ExecutionTimeLimit>PT24H</ExecutionTimeLimit>
with the same timeout because we saw that in some case the tasks continue the execution after the timeout.
@mwrock : I have implement our comment (with some delay :( )
Hi @mwrock
I have an issue with the windows tasks scheduler, sometimes the task does not return in the "Ready" (state 3) after the execution. So the run command does not close. I have some sidekiq jobs that try to execute command for 5 days. I see that the powershell script have an infinite loop, I propose to implement a timeout that kill the loop after 1 day (the time define in the xml configuration of the task). The timeout is configurable for the end user.
Could you please consider this change ?
Thank you