We have a limit set on the connections for our plex app server. That limit has been reached due to a connectivity blip with our load balancer causing a number of "orphaned" threads. We would like to avoid restarting the listener and causing a full break in service. Is there any way to "kill" threads in the app console, or programmatically?
Regarding this problem of ghost threads, there is no direct way apart from restarting the dispatcher.
Basically, when client gets disconnected the associated server thread will be terminated/closed. But in some cases when there is abnormal client shutdown, there might be possibility for having ghost threads left over.
Killing such threads manually (e.g. with Process explorer) may lead your application in inconsistent state. So we recommend to restart the dispatcher in these situations.