KeepAlive function in database functions to fixed connection lost error.