**Describe the bug**
Concurrent clients are trying to lock, swaplock, heaplock when bats are locked. This turned out after sockets were in CLOSE_WAIT state, no client access was allowed anymore due to max nclients (64), and the server did not clean up running mserver5 instances. monetdb status was giving "running".

**To Reproduce**
Hard to reproduce, but good chance it occurs when many concurrent clients run the same set of queries

**Expected behavior**
Running smoothly

**Software versions**
 - MonetDB Dec2023 SP1
 - Fedora 38
 - Installed from release package
Deadlock in BATrange
This is a GitHub Issue
repo:MonetDB
owner:MonetDB
Title : Deadlock in BATrange
Issue date:

--- start body ---
**Describe the bug**
Concurrent clients are trying to lock, swaplock, heaplock when bats are locked. This turned out after sockets were in CLOSE_WAIT state, no client access was allowed anymore due to max nclients (64), and the server did not clean up running mserver5 instances. monetdb status was giving "running".

**To Reproduce**
Hard to reproduce, but good chance it occurs when many concurrent clients run the same set of queries

**Expected behavior**
Running smoothly

**Software versions**
 - MonetDB Dec2023 SP1
 - Fedora 38
 - Installed from release package
--- end body ---
