0

We use app engine with CloudSQL and from time to time we get the following exception. It happens only when we do a native query from Java (it does not happen when we use JPA). Any idea how to get rid off it?

Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.google.cloud.sql.jdbc.internal.SQLUnknownConnectionIdException: Invalid connection id. Error Code: 1007

zdenekt
  • 1
  • 1

1 Answers1

0

That can happen when the database instance gets drained due to inactivity or gets restarted for some other reason. Is your instance on a package plan or per use plan? Per use has a shorter inactivity timeout than package.

Tony Tseng
  • 479
  • 2
  • 6