USEPA / EPA_Environmental_Dataset_Gateway

U.S. EPA’s Metadata Catalog
https://edg.epa.gov
3 stars 2 forks source link

Debug production stability issues #24

Closed torrin47 closed 6 years ago

torrin47 commented 7 years ago

Production EDG server restart script is detecting problem and restarting Tomcat several times an hour. Best theory so far on problem is database connection pool reaching max - possible that connections aren't being closed properly. Need to investigate in code, debug and address.

Possible memory issues leading theory.

torrin47 commented 6 years ago

Believe that this issue has been mostly addressed by the addition of the validationQuery parameter to the context.xml file for database connection:

<Context docBase="metadata" path="/metadata" debug="0" reloadable="true" crossContext="true">
    <Resource name="jdbc/gptlv10" auth="Container" type="javax.sql.DataSource"
              driverClassName="org.postgresql.Driver"
              url="jdbc:postgresql://localhost:5432/postgres"
              username="************"
              password="*************"
              maxActive="100"
              maxIdle="50"
              maxWait="-1" 
              validationQuery="select 1"/>
</Context>

Server is significantly more stable, fewer crashes. Closing ticket for now, will continue to monitor.