Hi Clarence,
It is related to the connection pool settings of the data source in AEM, you can turn off the pooling option to make the mobile app database connection close as the user close the app. Please refer to the article below for details.
https://docs.appeon.com/ps2020/server_configuration_guide_for_net/Resources.html#Adding_connection_cache
Please note that you cannot turn off pooling if Dynamic Database Connection is on because the connection pool in the PowerServer identifies the connection via the connection string (userid and password specified). When the client needs to get the connection, the PowerServer would check if there is an idle connection in the connection pool on the basis of the connection string, the client would directly get the connection from the connection pool if there is idle connection over there, and a new connection would be created if there is no idle connection over there.
For the .NET server, Appeon is using the Connection Pooling to improve the database operation performance. IIS will automatically manage the amount of the open sessions via the connection pooling, you can just set the "Maximum Connection Pool Size" and "Minimum Connection Pool Size". Once the amount of the open session is equal to the “Maximum Connection Pool Size”, IIS will not open the new session.
Minimum Connection Pool Size: The minimum number of connections Appeon Server opens and pools on startup. The bigger this value is the more resources it consumes at the start. So we suggest that you set it to 1.
Maximum Connection Pool Size: The max connections Appeon can open. To avoid a long time waiting, which happens when the Connection Pool reaches its maximum due to too many users, please set the Maximum Connection pool size according to the number of the concurrent users which need to use this Connection cache.
Regards,
ZhaoKai