Yesterday, I had to redeploy Temporal (still running v0.23.1) because I had to replace my GKE nodes with bigger VMs. So, I removed the K8s deployment completely, replaced the nodes and started everything from scratch.
I probably did something wrong, because since then, the frontend service is spewing errors at a continuous rate. This leads to timeouts in the client app which manages the creation of workflows.
Every minute, there is a repeating series of errors which seems to start with a context deadline exceeded error and this stacktrace:
I have no clue where to start investigating. All help welcome as I need this POC environment to demo to our application to a customer early next week, which means there is a bit of pressure on us to get this working.
Hey @ringods,
The stacktrace you provided above is not very helpful. All I can tell that StartWorkflowExecution calls on frontend are timing out. Do you have other backend errors, persistence errors or service metric you could share with us? I’ll be happy to jump on a zoom considering this is time sensitive for you. Please reach out to me on slack and we can setup a zoom.
Let me first thank you for the short Zoom call you offered. This definitely put me on the right track!
For the people after me, the following could be helpful.
During the call, Samar identified that although I reported problems with the frontend service, it actually was the history service which had MySQL errors. In my setup, I run on GKE with the Google Cloud SQL Proxy for MySQL as a sidecar container. Initially, we suspected this proxy was at fault.
When looking more closely at the logs of the history container, I noticed this line:
The issue at hand is that the application wants to use an idle connection which seems to be closed by the other end. That is possible because the default MaxConnLifetime is infinite.
The comments advice to configure your connection pool. This is what I added to the YAML configuration for the Temporal services, under persistence.datastores.default.sql and persistence.datastores.visibility.sql: