I’m getting [TMPRL1101] Potential deadlock detected: workflow didn’t yield within 2 second(s) and need a bit more time for some operations in my workflow interceptor.
Any configuration options or environment variables I can set?
Use case: Implementing distributed locking in workflow interceptors to limit concurrent activities across multiple workflow instances (e.g., max 5 database-heavy activities running simultaneously). The Redis calls for lock acquisition occasionally take >2s, triggering the deadlock detection.
Use local activities for this. Direct calls to Redis from workflows are not allowed as they are not deterministic and break other assumptions about workflow code.
Using a separate activity to acquire the lock is the way to go. Another option is to have a single task queue and then use a completely separate system like Redis to implement your rate limiting requirements.
I have an existing external Redis rate limiting system that I need to integrate. Is there a way to bypass deadlock detection for specific code blocks or increase the deadlock timeout without enabling full debug mode?
Context: I understand the determinism concerns, but I have a working Redis-based rate limiter that just needs a bit more time (3-5 seconds) for lock acquisition. Debug mode seems overkill and has performance implications.
Options I’m looking for:
Selective deadlock bypass for specific operations
Configurable deadlock timeout (per-workflow or globally)
Any other workarounds that don’t require debug mode
Does your system guarantee that the lock is obtained within seconds?
What happens when the downstream system is down for a while and a large backlog accumulated?