1 Reply Latest reply on Dec 31, 2018 9:07 AM by Frank Langelage

    How to resolve SQL Error: 17008, SQLState: 99999 wildfly 12 and oracle connection pool?

    alireza alallah Newbie

      We use `Hibernate/JPA` as orm and Wildfly12 as Application server in our project that connect to `Oracle11g`, our problem is that application thrown `SQL Error: 17008` and `connection closed` after work several minutes with database. my `DataSource` configuration exists in wildfly as below:

       

       

       

       

          <datasource jta="true" jndi-name="java:jboss/datasources/myDs" pool-name="myDs" enabled="true" use-java-context="true">

                                      <connection-url>jdbc:oracle:thin:@192.168.1.1:1521:mydb</connection-url>

                                  <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>

                                  <driver>ojdbc6.jar</driver>

                                  <pool>

                                      <min-pool-size>100</min-pool-size>

                                      <max-pool-size>500</max-pool-size>

                                      <prefill>true</prefill>

                                  </pool>

                                 ....

          </datasource>

       

       

      how we can resolve this problem?

        • 1. Re: How to resolve SQL Error: 17008, SQLState: 99999 wildfly 12 and oracle connection pool?
          Frank Langelage Master

          Do you really need such a huge pool? 500 connections at max? Did you tweak the oracle instance to handle this (sessions per used, ...)?

          Anyhow: you should add validation settings to your datasource configuration to get only checked valid connections from the pool:

          <validation>
           <background-validation>true</background-validation>
           <background-validation-millis>60000</background-validation-millis>
           <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>
           <stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"/>
           <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/>
          </validation>
          
          
          1 of 1 people found this helpful