This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Powershell Script does not close connections to the DB

I have a powershell script that removes interfaces based off a CSV.

I'm having an issue where when running the script my max connection pool to the DB reaches its max limit of 1000 and then it crashes the Information Services. I've watched this while running the script and stop it right before it reaches 1000 and then restart the service and it clears all the open connections. In the log, the only indication that it has any issue is this

pastedImage_0.png

other than that the only error is when it finally reaches its max limit and crashes the service.

I have run a repair on the core services, completed a config wizard.

I have two questions.

1. Is this expected behavior? (I doubt it because I have used this exact script in 2018.4 on roughly 17000 interfaces with no issues of this kind)

2. Should/could I be add something after the remove statement that closes the connection?

  • Not sure if the behavior was different before because I never really noticed it either, but can second that I was deleting interfaces with a client right running 12.5 right after it dropped and we encountered the same thing with the system choking after 1000 operations, doesn't matter if you are doing them in the GUI or via an API script (direct sql edits are fine though).  We ended up digging around and it seemed like there was no way to control the clearing process, they just time out after a couple minutes of inactivity.  Ultimately we decided to just increase the max connection pool to 10k and call it a day.  So far so good, but their system is far above the minimum requirements so YMMV.

    It seems like it might be better if there was an API verb that allowed you to pass an array of URI's or ID's instead of having to remove-swisobject for each one separately.

  • Thanks, clarv02​ I'm submitting a ticket right now for my own internal tracking. I'm going to reference your ticket number in it, and then post mine to that post you mentioned