Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
Description:
We're actually use a postgresql database to store the tenant User Stores and we're facing an issue with increasing number of IDLE connections.
the number keeps increasing until a process releases them every 10 hours (could be the "default time period for a SSO session" as it is the only parameter set to 10 hours by default.
I tried to set a bunch of parameters on both /usr/lib/wso2/wso2is-5.10.0/repository/conf/deployment-tpl.toml and /usr/lib/wso2/wso2is-5.10.0/repository/tenants/2/userstores/validation.xml and nothing seems to limit them.
All idle connections are the "SELECT 1" used to test de connectivity to DB.
parameters in tenant xml:
Description: We're actually use a postgresql database to store the tenant User Stores and we're facing an issue with increasing number of IDLE connections. the number keeps increasing until a process releases them every 10 hours (could be the "default time period for a SSO session" as it is the only parameter set to 10 hours by default.
I tried to set a bunch of parameters on both /usr/lib/wso2/wso2is-5.10.0/repository/conf/deployment-tpl.toml and /usr/lib/wso2/wso2is-5.10.0/repository/tenants/2/userstores/validation.xml and nothing seems to limit them.
All idle connections are the "SELECT 1" used to test de connectivity to DB. parameters in tenant xml:
<?xml version="1.0" encoding="UTF-8"?>
...
/usr/lib/wso2/wso2is-5.10.0/repository/conf/deployment-tpl.toml:
[database.identity_db] type = "postgre" hostname = "${WSO2_DB_IP}" name="${WSO2_DB_NAME}" username="${WSO2_DB_USERNAME}" password="${POSTGRES_PASSWORD}" port=${WSO2_DB_PORT} driver="org.postgresql.Driver" maxActive=20 maxWait=${WSO2_DB_MAX_WAIT} maxIdle=10 timeBetweenEvictionRunsMillis=3000 minIdle=7 testWhileIdle=true testOnReturn=true testOnBorrow=true validationQueryTimeout=5 removeAbandonedTimeout=true
I don't what else I can do. As We want to install several stores on the same DB, we have to find a way not to set PG max_connections to 1000 :(
Affected Product Version: IS 5.10.0 (docker) OS, DB, other environment details and versions:
debian 10 PG 12 Steps to reproduce: use PG as userstore.
Related Issues: