So i have this parameter in config <property name="maxActive" value="15" /> <property name="maxIdle" value="1" /> <property name="maxWait" value="10000" /> <property name="validationQuery" value="SELECT 1" /> <property name="removeAbandoned" value="true" /> <property name="removeAbandonedTimeout" value="60" />
And i have several app that initialize and use this driver. Then i calculate all of this initializing datasource - result is 380 active connections. I simple add all maxActive node directive from all app dbcp config xml. But as i write earlier this is about 100 concurrent connection when i do 'select count(1) from pg_stat_activity'. I think that inexpedient to install pgbouncer in front off db, or may be somebody in this list have some experience with pgbouncer and dbcp? Why i don't want to use pgbouncer:
1. I should use session mode because transaction doesn't support prepared statement.
2. If i use session mode, i will have the same number max connection to DB, because dbcp open connection to pgbouncer pgbouncer to DB and nobody close this connection, only dbcp first, if i understand all correct. So if overload happen i will have the same 380 heavyweight connection to DB and all breaks down?
I think that i should correctly configure my dbcp pool config xml file.
Did a freeze-up occur in there someplace? Otherwise, that is not not so useful.
You should try to decrease the sar interval to 1 min if you can. The extra overhead is negligible and the extra information can be very valuable. I'd also have something like "vmstat 5" running and capture that. Although perhaps one of the options to sar other than -u capture that same information, I know little of the other sar options.