Problem with Interval Trigger in Background Scheduler #703
Unanswered
sri-dhurkesh
asked this question in
Q&A
Replies: 1 comment 13 replies
-
Have you tried setting a more lenient |
Beta Was this translation helpful? Give feedback.
13 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am currently working on Algorithmic trading and I am using an API to retrieve data every second. The API request takes approximately 300ms. However, I am experiencing an issue where the background scheduler with an interval trigger is skipping some time. Specifically, on average every 20 seconds, I receive a warning that states "
skipped: maximum number of running instances reached.
" I have tried using a different scheduler library, the schedule library, and it works without skipping any time. I suspect that this issue may be caused by thread overload, but I am not certain. Can anyone provide guidance on how to solve this problem? Below is the code for the scheduler that I am currently using:scheduler.add_job(id="Monitor", func=get_data, trigger="interval", seconds=1, coalesce=True, timezone="Asia/Kolkata")
Note: I am not able to increase the max instance.Because it is a synchronous process.
Beta Was this translation helpful? Give feedback.
All reactions