Temporal Activity stuck in PENDING_ACTIVITY_STATE_SCHEDULED

Hi,

I am trying to develop a spring boot application using temporal for automating workflows. The workflow is a parent workflow with multiple Child workflows running sequentially. Now when a child workflow is running, the activity gets stuck in a PENDING_ACTIVITY_STATE_SCHEDULED state and taking a long time for it to be executed. Any way in which we can reduce this additional latency that we are facing?

It is retrying due to the following failure:
Screenshot 2025-04-09 at 10.44.37 AM

Make sure that you register this activity with the worker.

All the activity methods are getting registered. But there is an initial delay during which the worker fails to pick up the activity method and after around 9-10 retries, the worker picks up the activity.
So is there a reason

My guess is that you have some other (possibly stale) worker listening on the same task queue.
The pending activity view shows the identity of the worker who touched the activity last. Compare it to the identity of the worker that completed the activity (found in the ActivityTaskCompletedEvent).