I have been having this error for a while and I do not know what could be causing it.
The thing is that it only happens in production. I have the app deployed to a AWS EC2 container managed by a Beanstalk. The error shows up every few hours; not sure how much.
After searching the web a found a few sources and I changed my data source configuration to this:
# Configuration needed to keep the JPA entity open
# Used from here: https://github.com/GluuFederation/message-consumer/issues/4
# This would be enough: https://github.com/netgloo/spring-boot-samples/blob/master/spring-boot-mysql-springdatajpa-hibernate/src/main/resources/application.properties
datasource:
tomcat:
initial-size: 34
max-active: 377
max-idle: 233
min-idle: 89
time-between-eviction-runs-millis: 34000
min-evictable-idle-time-millis: 55000
validation-query: SELECT 1
validation-interval: 4000
test-on-borrow: true
remove-abandoned: true
remove-abandoned-timeout: 55
I have checked and I can connect directly to the database using Workbench and I made a few queries without a problem.
Also the AWS container health is good (as far as I know, it's green :))
Any ideas about this?