Workflow is getting stuck at re-starting the service

Make sure that your workflow implementation is deterministic. You can see associated rules here: Workflows in Java | Temporal documentation

Also make sure you look at your workflow exec history. There are many scenarios where WorkflowTaskTimeout can happen, see this post for more info, and looking at the history should provide info to find out the possible cause.