A MID Sever restart clears stuck threads. Until your causes of stuck threads are fixed, one possible workaround is to have a scheduled script run periodically to tell the MID Server(s) to restart themselves.
- Open a list of all MID Servers: In the navigation MID Server -> Servers. (ecc_agent table)
- Filter the list down to only the MID Servers(s) you need to be restarting. e.g. Name Contains 'Disco'.
- Add an extra condition for Status IS Up, so that we only restart MID Servers that are running.
- Right click the blue filter line and 'Copy query'. This will give you the Encoded Query String for this list filter that we will use in the script. e.g. "nameLIKEdisco^status=Up"
- Open a new Scheduled Script record (sysauto_script): System Definition -> Scheduled Jobs, click New, click Automatically run a script of your choosing.
- Fill in Name: (custom) Restart MID Servers to clear stuck threads
- Fill in the schedule fields. e.g. Run: Weekly, Day: Sunday, Time: 07:00:00. Pick a time when no jobs are likely to be running in your MID Servers.
- Paste the following script into the Run this script field:
- Paste your query string copied earlier into the addEncodedQuery function highlighted above. The line will then look like e.g.
- Submit. The script will now run on the next scheduled time.
- To test this script, or run it on demand, use the Execute Now button.