Application restarting after Consul Error creating key/values for context

Springboot app in production restarts after below warning occurs. This happens after the application has been running for sometime due to which all the nodes restarts.

WARN o.s.c.c.c.ConfigWatch [] Error querying consul Key/Values for context .Message: Error creating bean with name ‘getDataSource’: Could not bind properties to ‘DataSource’ : prefix=spring.datasource, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is Failed to bind properties under ‘spring.datasource’ to javax.sql.DataSource

This is happening continuously. Tried to stop restart by setting fail-fast as false but didn’t work. Now i have disabled the watch to not keep looking for updates in consul. But that doesn’t solve the problem.

I have been using springboot 2.2.0 and dependency spring-cloud-starter-consul-al