Single DB for multiple applications

Hi,

In my project, there are 2 APIs and each runs 2 queues. Both of APIs shares same DB for Hangfire.

While running Recurring job, I’m getting error mentioned below:
Recurring job ‘Test1.Execute’ can not be scheduled due to job load exception.

The possible reason could be, two of APIs tries to run jobs which are not configured to them.

Example:
API1: Name - Test1, Queues - A and B
API2: Name - Test2, Queues - C and D

So I think, Test1 is trying to run a job from the queue named “C”.

Could you please suggest, how to fix this issue. Am I missing something in configurations?
(v1.5.3.0 is being used.)

Thanks in adv.

1 Like

I have noticed the same behavior. This appears to be a Hangfire bug. It should not be trying to create a job for a queue that it is not registered for. Have you received any replies?

Neither received any replies nor could find the solution. For now, separate DBs are created to handle queues of each APIs (didn’t like this solution but had to implement).

You said that you have noticed same behaviour, so did you find any solution for the same?

I also wanted to use single DB for multiple instances running on different machines. As per the documentation here it is supported since version 1.5. You are using V1.5 is it still not working?

This is not a supported scenario. There is a workaround though: https://github.com/GeXiaoguo/Hangfire.MAMQSqlExtension