These sessions are likely being leaked because there was an error in processing the RMI request. There is at least 1 known issue whose fix is not yet in a fix pack that matches this scenario.
You can view all sessions in the UI's Active Users page until the web-mgmt idle time out causes the session to be deleted. The Disconnect action can also be used in the Active Users page to delete the leaked session.
If the web-mgmt idle time out is set to 0, the leaked session will persist until it is deleted by the Disconnect action or the DataPower is reloaded.
You can also lower the web management idle timeout to make the leaked sessions be deleted sooner. The new idle timeout value will only impact sessions that are created after the value is changed. The new idle timeout value will not impact sessions that existed prior to the value being changed.
You can also show the active user sessions with RMI. A sample request would be
curl --basic -u MY_USER:MY_PASSWORD -k https://MY_DP:5554/mgmt/status/default/AllActiveUsers
You can then disconnect a user session with RMI. A sample request would be
echo '{"Disconnect":{"id": MY_SESSION_NUMBER, "connection": "rest-mgmt"}}' |curl -s --basic -k -u $MY_USER:$MY_PASSWORD --data-binary @- https://MY_DP:5554/mgmt/actionqueue/default
You might also want to look in the DP log for errors related to the original RMI requests that created the leaked sessions