# Bug OP-15055 - Large number of CreateDateAlertNotificationJobs delaying background job execution

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-15055

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module |  |
| Target versions | 14.1.0 |
| Observed in versions | 14.0.0 |
| Sprint | 14.1.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 14.0.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Jens Ulferts |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

The exact steps to reproduce are still unclear. This happened as described in <mention class="mention" data-id="54984" data-type="work_package" data-text="#54984">#54984</mention>. An hypothesis is to:

  - Have a large number of users and work packages

  - Disable the background workers (e.g. by scaling them down) for some time or use some other measure to place huge load on background worker. 

  - Reenable background workers after a longer time (hours)

  - Monitor background jobs

### What is the buggy behavior?

*Please describe the bug in as much detail as possible. Example:*

  - A large number (millions in the witnessed case) of `CreateDateAlertNotificationJobs` are created
    
      - Each of these will result in Notifications being created and recreated placing the background worker under even heavier load worsening the situation.

  - A number of `ScheduleDateAlertNotificationJob`s are created (at least more than should be there).

### What is the expected behavior?

*Describe how the application should behave like. Example:*

1.  Only have one `ScheduleDateAlertNotificationJob` running and max one scheduled which should lead to less `CreateDateAlertNotificaitonJob`s being created.
