79625627

Date: 2025-05-16 17:04:06
Score: 1
Natty:
Report link

I'm working on something similar and found that combining GEVENT_MAX_BLOCKING_TIME with a custom greenlet.settrace() can help, but the trick is to log only when the block duration exceeds your threshold. You can store the last switch time and compare it inside the trace function to conditionally print the stack trace. Just be sure to set up the trace before starting the hub and apply monkey patching early if you're using it.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Karen Brewer