1

Localy spring boot app works but on remote server I got:

org.springframework.orm.jpa.JpaSystemException", "message": "com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.; nested exception is javax.persistence.PersistenceException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.

All settings are the same and application connects to the same database.

I added the following settings and now it is working:

spring.jpa.properties.hibernate.c3p0.max_size 2000
spring.jpa.properties.hibernate.c3p0.min_size 100
spring.jpa.properties.hibernate.c3p0.timeout 5000
spring.jpa.properties.hibernate.c3p0.max_statements 1000
spring.jpa.properties.hibernate.c3p0.idle_test_period 3000
spring.jpa.properties.hibernate.c3p0.acquire_increment 2
spring.jpa.properties.hibernate.c3p0.validate false

What is the reason occurrence of this error? What caused that spring boot app stopped working?

Kamil Nękanowicz
  • 6,254
  • 7
  • 34
  • 51
  • For starters you shouldn't be using the hibernate internal connection pool, but configure a proper connection pool yourself. Also post the full stacktrace instead of a snippet. – M. Deinum Dec 14 '16 at 11:22
  • possible duplicate http://stackoverflow.com/questions/7565143/com-mysql-jdbc-exceptions-jdbc4-mysqlnontransientconnectionexception-no-operati – Nadir Dec 14 '16 at 13:03
  • add more details. actual code and config – ScanQR Dec 14 '16 at 15:08

0 Answers0