Hi all,

It seems that DIH always holds two connections open to the database.
One of them is almost always 'idle in transaction'. It may sometimes
seem to do a little work but then it goes idle again.


datasource definition:
        <dataSource name="df-stream-store-ds"
jndiName="java:ext_solr_datafeeds_dba" type="JdbcDataSource"
autoCommit="false" batchSize="10000" />

We have a datasource defined in the jndi:
        <no-tx-datasource>
                <jndi-name>ext_solr_datafeeds_dba</jndi-name>
                <security-domain>ext_solr_datafeeds_dba_realm</security-domain>
                
<connection-url>jdbc:postgresql://db1.live.mbuyu.nl/datafeeds</connection-url>
                <min-pool-size>0</min-pool-size>
                <max-pool-size>5</max-pool-size>
                
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
                <driver-class>org.postgresql.Driver</driver-class>
                <blocking-timeout-millis>30000</blocking-timeout-millis>
                <idle-timeout-minutes>5</idle-timeout-minutes>
                <new-connection-sql>SELECT 1</new-connection-sql>
                <check-valid-connection-sql>SELECT 
1</check-valid-connection-sql>
        </no-tx-datasource>


If we set autocommit to true then we get an OOM on indexing so that is
not an option.

Does anyone have any idea why this happens? I would guess that DIH
doesn't close the connection, but reading the code I can't be sure of
this. The ResultSet object should close itself once it reaches the
end.

mvg,
JAsper

Reply via email to