Support Article

Agent for extraction to the external tables fails



User has a daily agent that runs an activity that connects to a external database and extracts all the details in that database. Database connections are established through the Pega Database rule with Connection type JDBC URL.

Errors occur whenever the external database is rebooted. After the database server reboot has finished, the agent fails with ResourceUnavailableException.
If the agent activity is run manually, no issue occur.

Error Messages

java.sql.SQLRecoverableException: Io exception: Connection reset
at oracle.jdbc.driver.SQLStateMapping.newSQLException(
at oracle.jdbc.driver.DatabaseError.newSQLException(
at oracle.jdbc.driver.DatabaseError.throwSqlException(
at oracle.jdbc.driver.DatabaseError.throwSqlException(
at oracle.jdbc.driver.DatabaseError.throwSqlException(
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(
at oracle.jdbc.driver.OraclePreparedStatement.execute(
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(

Steps to Reproduce

Consider the following steps as an example:
  1. Run the agent StartReporting on one day at 8 p.m. EST.
  2. Reboot the server on the next day between 12 a.m. to 6 p.m. EST. The server reboot finishes at 5 p.m. EST.
  3. Run the agent at 8 p.m. EST on the same day to see the server reboot failure.

Root Cause

A defect or configuration issue in the operating environment
When the agent is enabled and run for the first time, the connection to the database is established. Because this is not a connection pool when the agent is run again, it gets the same database connection that is no longer valid because the database has been rebooted.


Make the following change to the operating environment:

Use a data source instead of a URL connection to leverage the connection validation and pooling functionality of the application server.

Published April 11, 2017 - Updated May 1, 2017

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.