Our app (Workzone for Bitbucket) listens to PullRequestRescopedEvent. In some instances there are floods of this event type in a very short amount of time.
The app performs a merge-check
The event listener has 2 choices
- process events synchronously - this leads to event thread exhaustion.
- process events async - this leads to JDBC pool exhaustion due to pull request lookups
I am wondering where such a flood of PullRequestRescopedEvent in a short amount of time may originate? What can trigger this to happen?
As for timing - the merge-check doesn’t need to be performed in-sync for notifications to be sent out. Is there a way to limit the JDBC connection pool allocated - so the event handler can be made async again?
Thanks for your thoughts and comments.
Kind regards, Ulrich