I have a spring boot rest API set up that accepts JSON data and does some database operations with the values. I am running into an issue where every so often, the web service produces the following error:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Like I said, it does not happen all of the time. I can get it to happen via postman when I send a successful request and then wait a couple of minutes and try to send another request, it throws the error. But when i send another immediate request after the error, it works fine. Is this a database settings issue? I've tried a lot of different tomcat settings like the following in my yaml file:
validation-query: SELECT 1
Thank you in advance for the help.