Running bco-test --simuate and observing its memory usage in VisualVM reveals a memory leak. The Heap Dump reveals that the static list authenticatedFutureList in the class AbstractAuthenticationFuture makes up a large amount of this memory and the number of futures in this list is always increasing.
The idea with this list is that it is required to call get on these futures to update the users session (this is a problem if the future is created but no one calls get on it). Thus we keep a list of these features and regularly call get on futures which are already done. These futures and canceled futures are then removed from the list.
We should investigate why some futures on this list are never removed (are they never done?). If they never finish we could still remove all futures which are older than a timeout (e.g. 30 seconds, or simply the session timeout) since it is unusual that these could still help in keeping the users session alive.
Running
bco-test --simuateand observing its memory usage in VisualVM reveals a memory leak. The Heap Dump reveals that the static listauthenticatedFutureListin the classAbstractAuthenticationFuturemakes up a large amount of this memory and the number of futures in this list is always increasing.The idea with this list is that it is required to call get on these futures to update the users session (this is a problem if the future is created but no one calls get on it). Thus we keep a list of these features and regularly call get on futures which are already done. These futures and canceled futures are then removed from the list.
We should investigate why some futures on this list are never removed (are they never done?). If they never finish we could still remove all futures which are older than a timeout (e.g. 30 seconds, or simply the session timeout) since it is unusual that these could still help in keeping the users session alive.