-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Docs] Add notice for deadlock issue on doctrine messenger transport - …
…resolves #15698
- Loading branch information
Showing
2 changed files
with
25 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
doc/Development_Documentation/01_Getting_Started/08_Maintenance_Tasks.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
### Doctrine Transport | ||
Pimcore ships with a Doctrine Transport for the Messenger component. This is done to reduce the dependencies and get the setup running more quickly. | ||
If you are using Doctrine Transport for your maintenance jobs, you might face deadlock issue when running multiple workers. | ||
We recommend to use a proper message queue like RabbitMQ or Redis for production environments. | ||
|
||
Read more Symfony Messenger Transports [here](https://symfony.com/doc/current/messenger.html#transport-configuration). | ||
|
||
### Handle Failed jobs | ||
If there are maintenance jobs that are failed in the processing, after defined retries they are discarded from the respective transport. | ||
However, you can move the failed jobs to a new transport e.g. `pimcore_failed_jobs` instead of discarding them completely, with following config: | ||
```yaml | ||
framework: | ||
messenger: | ||
transports: | ||
pimcore_failed_jobs: | ||
dsn: "doctrine://default?queue_name=pimcore_failed_jobs&table_name=messenger_messages_pimcore_failed" | ||
|
||
pimcore_core: | ||
dsn: "doctrine://default?queue_name=pimcore_core" | ||
failure_transport: pimcore_failed_jobs | ||
``` | ||
which can be re-processed later after fixing the underlying issue with command `bin/console messenger:consume pimcore_failed_jobs`. | ||
|
||
Please follow the [Symfony docs](https://symfony.com/doc/current/messenger.html#saving-retrying-failed-messages) for options on failed jobs processing. |