1

I am using MYSql on Google Cloud with Java+Hibernate web app. While accessing website after some time interval I am getting below exception:

Caused by: java.sql.SQLNonTransientConnectionException: No operations allowed after connection closed.

However after refreshing page few times it works again. When I checked logs on Google Cloud I found this repeating error:

A 2019-12-09T00:36:01Z 2019/12/09 00:36:01 ephemeral certificate for instance MYSQL_INSTANCE_NAME will expire soon, refreshing now.

A 2019-12-09T00:36:35Z 2019/12/09 00:36:35 ephemeral certificate for instance MYSQL_INSTANCE_NAME will expire soon, refreshing now.

Is this closing the connection then reopening? Could you please let me know how to fix this?

Sukhpal Singh
  • 672
  • 1
  • 12
  • 31

1 Answers1

0

As per the official documentation in Java:

Caused by: java.sql.SQLNonTransientConnectionException: No operations allowed after connection closed.

This indicates that the connection operation that failed will not succeed if the operation is retried without the cause of the failure being corrected.

I've found the following solution in another StackOverFlow post.

The following is informing you:

A 2019-12-09T00:36:35Z 2019/12/09 00:36:35 ephemeral certificate for instance MYSQL_INSTANCE_NAME will expire soon, refreshing now.

That the certificate is being renewed from what I could gather this is related with the time-zone specifications. Have a look at this SO thread.

I also see that you managed to connect with Hibernate to Cloud SQL could you update your other question with how you solved it? I was looking into it and was about to give you an answer with some questions as well but I saw this post.

Let me know.

Stefan G.
  • 890
  • 5
  • 10
  • Thanks @Stefan for your answer, and I answered my another question. – Sukhpal Singh Dec 14 '19 at 15:20
  • I hope my answer helped you solve your question. If it helped you solve the issue, please mark it as accepted for higher visibility. Thank you for updating the other question as well, for future questions about App Engine please specify if you're using either flex or standard, it helps in understanding what you are trying to do. – Stefan G. Dec 16 '19 at 10:44