There can be rare instances where the number of users may not match the number of licenses used. In this scenario, here are some steps to check:
1. Assure that you are using the latest LTS / R version of 4D as certain bugs related to mismatched users and licenses have been addressed.
2. Check whether any users are REST clients. Since each REST client will take up a 4D client user, you may need contact account rep to add additional client expansions.
3. Check whether there are any calls to SET DATABASE PARAMETER(Idle connections timeout; 0) which prevents idle connections from timing out. It is recommended to set it to default value 20.