Content
View differences
Updated by Marcello Rocha Pereira about 1 year ago
### Steps to reproduce
1. limit the good job threads to, say, 4 by setting `OPENPROJECT_GOOD__JOB_MAX__THREADS=4`
2. attach, say, 8 images to a work package at the same time
3. try exporting a work package
Reproducing this is a bit tricky. But we know that it can happen because we observed it in multiple places. This is due to [this bug](https://github.com/tesseract-ocr/tesseract/issues/898#issuecomment-315202167) in tesseract which we use for OCR.
The fix is to set the `OMP_THREAD_LIMIT=1` when calling tesseract.
But this bug reveals a larger issue in the OpenProject background job logic. An issue of fairness.
### What is the buggy behavior?
* the export may not finish for a long time
### What is the expected behavior?
* The export should run through quickly
### Environment information
**OpenProject installation type**
* Hosted cloud edition
**OpenProject version**
_v15.5.1_
List of the current Jobs in OP (as of 12.05.2025)
_1\. app/workers/announcements/scheduler\_job.rb_
_2\. app/workers/application\_job.rb_
_3\. app/workers/attachments/cleanup\_uncontainered\_job.rb_
_4\. app/workers/attachments/extract\_fulltext\_job.rb_
_5\. app/workers/attachments/finish\_direct\_upload\_job.rb_
_6\. app/workers/attachments/virus\_rescan\_job.rb_
_7\. app/workers/attachments/virus\_scan\_job.rb_
_8\. app/workers/backup\_job.rb_
_9\. app/workers/concerns/state\_machine\_job.rb_
_10\. app/workers/copy\_project\_job.rb_
_11\. app/workers/cron/clear\_old\_sessions\_job.rb_
_12\. app/workers/cron/clear\_tmp\_cache\_job.rb_
_13\. app/workers/cron/clear\_uploaded\_files\_job.rb_
_14\. app/workers/cron/quarter\_hour\_schedule\_job.rb_
_15\. app/workers/debounceable\_job.rb_
_16\. app/workers/exports/cleanup\_outdated\_job.rb_
_17\. app/workers/exports/export\_job.rb_
_18\. app/workers/journals/completed\_job.rb_
_19\. app/workers/ldap/synchronization\_job.rb_
_20\. app/workers/mails/deliver\_job.rb_
_21\. app/workers/mails/invitation\_job.rb_
_22\. app/workers/mails/mailer\_job.rb_
_23\. app/workers/mails/member\_created\_job.rb_
_24\. app/workers/mails/member\_job.rb_
_25\. app/workers/mails/member\_updated\_job.rb_
_26\. app/workers/mails/reminder\_job.rb_
_27\. app/workers/mails/reminders/notification\_delivery\_job.rb_
_28\. app/workers/mails/watcher\_added\_job.rb_
_29\. app/workers/mails/watcher\_job.rb_
_30\. app/workers/mails/watcher\_removed\_job.rb_
_31\. app/workers/mails/work\_package\_shared\_job.rb_
_32\. app/workers/notifications/create\_date\_alerts\_notifications\_job.rb_
_33\. app/workers/notifications/group\_member\_altered\_job.rb_
_34\. app/workers/notifications/schedule\_date\_alerts\_notifications\_job.rb_
_35\. app/workers/notifications/schedule\_reminder\_mails\_job.rb_
_36\. app/workers/notifications/workflow\_job.rb_
_37\. app/workers/oauth/cleanup\_job.rb_
_38\. app/workers/paper\_trail\_audits/cleanup\_job.rb_
_39\. app/workers/principals/delete\_job.rb_
_40\. app/workers/projects/delete\_project\_job.rb_
_41\. app/workers/projects/export\_job.rb_
_42\. app/workers/rake\_job.rb_
_43\. app/workers/reminders/schedule\_reminder\_job.rb_
_44\. app/workers/scm/create\_local\_repository\_job.rb_
_45\. app/workers/scm/create\_remote\_repository\_job.rb_
_46\. app/workers/scm/delete\_local\_repository\_job.rb_
_47\. app/workers/scm/delete\_remote\_repository\_job.rb_
_48\. app/workers/scm/relocate\_repository\_job.rb_
_49\. app/workers/scm/remote\_repository\_job.rb_
_50\. app/workers/scm/storage\_updater\_job.rb_
_51\. app/workers/send\_copy\_project\_status\_email\_job.rb_
_52\. app/workers/user\_job.rb_
_53\. app/workers/work\_packages/apply\_working\_days\_change\_job.rb_
_54\. app/workers/work\_packages/automatic\_mode/migrate\_values\_job.rb_
_55\. app/workers/work\_packages/bulk\_copy\_job.rb_
_56\. app/workers/work\_packages/bulk\_job.rb_
_57\. app/workers/work\_packages/bulk\_move\_job.rb_
_58\. app/workers/work\_packages/export\_job.rb_
_59\. app/workers/work\_packages/progress/apply\_statuses\_change\_job.rb_
_60\. app/workers/work\_packages/progress/apply\_total\_percent\_complete\_mode\_change\_job.rb_
_61\. app/workers/work\_packages/progress/job.rb_
_62\. app/workers/work\_packages/progress/migrate\_remove\_totals\_from\_childless\_work\_packages\_job.rb_
_63\. app/workers/work\_packages/progress/migrate\_values\_job.rb_
_64\. modules/bim/app/workers/bim/ifc\_models/ifc\_conversion\_job.rb_
_65\. modules/github\_integration/app/workers/cron/check\_deploy\_status\_job.rb_
_66\. modules/github\_integration/app/workers/cron/clear\_old\_pull\_requests\_job.rb_
_67\. modules/gitlab\_integration/app/workers/cron/clear\_old\_merge\_requests\_job.rb_
_68\. modules/job\_status/app/workers/job\_status/cron/clear\_old\_job\_status\_job.rb_
_69\. modules/ldap\_groups/app/workers/ldap\_groups/synchronization\_job.rb_
_70\. modules/meeting/app/workers/recurring\_meetings/init\_next\_occurrence\_job.rb_
_71\. modules/meeting/app/workers/recurring\_meetings/init\_next\_occurrence\_watchdog\_job.rb_
_72\. modules/reporting/app/workers/cost\_query/pdf/export\_timesheet\_job.rb_
_73\. modules/reporting/app/workers/cost\_query/xls/export\_job.rb_
_74\. modules/storages/app/workers/storages/automatically\_managed\_storage\_sync\_job.rb_
_75\. modules/storages/app/workers/storages/cleanup\_uncontainered\_file\_links\_job.rb_
_76\. modules/storages/app/workers/storages/copy\_project\_folders\_job.rb_
_77\. modules/storages/app/workers/storages/health\_status\_mailer\_job.rb_
_78\. modules/storages/app/workers/storages/manage\_storage\_integrations\_job.rb_
_79\. modules/webhooks/app/workers/attachment\_webhook\_job.rb_
_80\. modules/webhooks/app/workers/cleanup\_webhook\_logs\_job.rb_
_81\. modules/webhooks/app/workers/project\_webhook\_job.rb_
_82\. modules/webhooks/app/workers/represented\_webhook\_job.rb_
_83\. modules/webhooks/app/workers/time\_entry\_webhook\_job.rb_
_84\. modules/webhooks/app/workers/webhook\_job.rb_
_85\. modules/webhooks/app/workers/work\_package\_webhook\_job.rb_
1. limit the good job threads to, say, 4 by setting `OPENPROJECT_GOOD__JOB_MAX__THREADS=4`
2. attach, say, 8 images to a work package at the same time
3. try exporting a work package
Reproducing this is a bit tricky. But we know that it can happen because we observed it in multiple places. This is due to [this bug](https://github.com/tesseract-ocr/tesseract/issues/898#issuecomment-315202167) in tesseract which we use for OCR.
The fix is to set the `OMP_THREAD_LIMIT=1` when calling tesseract.
But this bug reveals a larger issue in the OpenProject background job logic. An issue of fairness.
### What is the buggy behavior?
* the export may not finish for a long time
### What is the expected behavior?
* The export should run through quickly
### Environment information
**OpenProject installation type**
* Hosted cloud edition
**OpenProject version**
_v15.5.1_
List of the current Jobs in OP (as of 12.05.2025)
_1\. app/workers/announcements/scheduler\_job.rb_
_2\. app/workers/application\_job.rb_
_3\. app/workers/attachments/cleanup\_uncontainered\_job.rb_
_4\. app/workers/attachments/extract\_fulltext\_job.rb_
_5\. app/workers/attachments/finish\_direct\_upload\_job.rb_
_6\. app/workers/attachments/virus\_rescan\_job.rb_
_7\. app/workers/attachments/virus\_scan\_job.rb_
_8\. app/workers/backup\_job.rb_
_9\. app/workers/concerns/state\_machine\_job.rb_
_10\. app/workers/copy\_project\_job.rb_
_11\. app/workers/cron/clear\_old\_sessions\_job.rb_
_12\. app/workers/cron/clear\_tmp\_cache\_job.rb_
_13\. app/workers/cron/clear\_uploaded\_files\_job.rb_
_14\. app/workers/cron/quarter\_hour\_schedule\_job.rb_
_15\. app/workers/debounceable\_job.rb_
_16\. app/workers/exports/cleanup\_outdated\_job.rb_
_17\. app/workers/exports/export\_job.rb_
_18\. app/workers/journals/completed\_job.rb_
_19\. app/workers/ldap/synchronization\_job.rb_
_20\. app/workers/mails/deliver\_job.rb_
_21\. app/workers/mails/invitation\_job.rb_
_22\. app/workers/mails/mailer\_job.rb_
_23\. app/workers/mails/member\_created\_job.rb_
_24\. app/workers/mails/member\_job.rb_
_25\. app/workers/mails/member\_updated\_job.rb_
_26\. app/workers/mails/reminder\_job.rb_
_27\. app/workers/mails/reminders/notification\_delivery\_job.rb_
_28\. app/workers/mails/watcher\_added\_job.rb_
_29\. app/workers/mails/watcher\_job.rb_
_30\. app/workers/mails/watcher\_removed\_job.rb_
_31\. app/workers/mails/work\_package\_shared\_job.rb_
_32\. app/workers/notifications/create\_date\_alerts\_notifications\_job.rb_
_33\. app/workers/notifications/group\_member\_altered\_job.rb_
_34\. app/workers/notifications/schedule\_date\_alerts\_notifications\_job.rb_
_35\. app/workers/notifications/schedule\_reminder\_mails\_job.rb_
_36\. app/workers/notifications/workflow\_job.rb_
_37\. app/workers/oauth/cleanup\_job.rb_
_38\. app/workers/paper\_trail\_audits/cleanup\_job.rb_
_39\. app/workers/principals/delete\_job.rb_
_40\. app/workers/projects/delete\_project\_job.rb_
_41\. app/workers/projects/export\_job.rb_
_42\. app/workers/rake\_job.rb_
_43\. app/workers/reminders/schedule\_reminder\_job.rb_
_44\. app/workers/scm/create\_local\_repository\_job.rb_
_45\. app/workers/scm/create\_remote\_repository\_job.rb_
_46\. app/workers/scm/delete\_local\_repository\_job.rb_
_47\. app/workers/scm/delete\_remote\_repository\_job.rb_
_48\. app/workers/scm/relocate\_repository\_job.rb_
_49\. app/workers/scm/remote\_repository\_job.rb_
_50\. app/workers/scm/storage\_updater\_job.rb_
_51\. app/workers/send\_copy\_project\_status\_email\_job.rb_
_52\. app/workers/user\_job.rb_
_53\. app/workers/work\_packages/apply\_working\_days\_change\_job.rb_
_54\. app/workers/work\_packages/automatic\_mode/migrate\_values\_job.rb_
_55\. app/workers/work\_packages/bulk\_copy\_job.rb_
_56\. app/workers/work\_packages/bulk\_job.rb_
_57\. app/workers/work\_packages/bulk\_move\_job.rb_
_58\. app/workers/work\_packages/export\_job.rb_
_59\. app/workers/work\_packages/progress/apply\_statuses\_change\_job.rb_
_60\. app/workers/work\_packages/progress/apply\_total\_percent\_complete\_mode\_change\_job.rb_
_61\. app/workers/work\_packages/progress/job.rb_
_62\. app/workers/work\_packages/progress/migrate\_remove\_totals\_from\_childless\_work\_packages\_job.rb_
_63\. app/workers/work\_packages/progress/migrate\_values\_job.rb_
_64\. modules/bim/app/workers/bim/ifc\_models/ifc\_conversion\_job.rb_
_65\. modules/github\_integration/app/workers/cron/check\_deploy\_status\_job.rb_
_66\. modules/github\_integration/app/workers/cron/clear\_old\_pull\_requests\_job.rb_
_67\. modules/gitlab\_integration/app/workers/cron/clear\_old\_merge\_requests\_job.rb_
_68\. modules/job\_status/app/workers/job\_status/cron/clear\_old\_job\_status\_job.rb_
_69\. modules/ldap\_groups/app/workers/ldap\_groups/synchronization\_job.rb_
_70\. modules/meeting/app/workers/recurring\_meetings/init\_next\_occurrence\_job.rb_
_71\. modules/meeting/app/workers/recurring\_meetings/init\_next\_occurrence\_watchdog\_job.rb_
_72\. modules/reporting/app/workers/cost\_query/pdf/export\_timesheet\_job.rb_
_73\. modules/reporting/app/workers/cost\_query/xls/export\_job.rb_
_74\. modules/storages/app/workers/storages/automatically\_managed\_storage\_sync\_job.rb_
_75\. modules/storages/app/workers/storages/cleanup\_uncontainered\_file\_links\_job.rb_
_76\. modules/storages/app/workers/storages/copy\_project\_folders\_job.rb_
_77\. modules/storages/app/workers/storages/health\_status\_mailer\_job.rb_
_78\. modules/storages/app/workers/storages/manage\_storage\_integrations\_job.rb_
_79\. modules/webhooks/app/workers/attachment\_webhook\_job.rb_
_80\. modules/webhooks/app/workers/cleanup\_webhook\_logs\_job.rb_
_81\. modules/webhooks/app/workers/project\_webhook\_job.rb_
_82\. modules/webhooks/app/workers/represented\_webhook\_job.rb_
_83\. modules/webhooks/app/workers/time\_entry\_webhook\_job.rb_
_84\. modules/webhooks/app/workers/webhook\_job.rb_
_85\. modules/webhooks/app/workers/work\_package\_webhook\_job.rb_