I have a service that makes powershell connection to the server to execute cmdlets. In the test lab, it opened connections, executed cmdlets, then closed/disposed connections without any issues. It was sweet.
However, in production, connections are not being closed/disposed. I monitor using netstat. For a few days when service get setarted, I see all opened connections were being closed/disposed. After few more days, it showed increases in the total number of connection, which I believe are broken connections. Let the service runs, it threw exception after weeks.
Connecting to remote server failed with the following error message : The WS-Management service cannot process the request. This user is allowed a maximum number of 18 concurrent shells, which has been exceeded. Close existing shells or raise the quota for this user.
Restart the service, all connections gets cleared. Then, the problem repeats.
Who has/had the same problem and how did it get resolved?