Feature #36695
closedAdd check in Redmine information page if default queue adapter is used in production
0%
Description
Using the default queue adapter (:async
) in production is not recommended because the queue is stored in memory and you can easily lose the items from the queue (https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/AsyncAdapter.html).
Since #26791, there were multiple issues reported caused by the default queue adapter (for example: #31241).
My proposal is to add the following check in Redmine information page:
Files
Updated by Marius BĂLTEANU almost 3 years ago
Maybe the following translation is better: "Default queue adapter changed (is well suited only for dev/test)".
Updated by Karel Pičman about 1 year ago
Here is a patch, that implements the requested feature.
Updated by Mischa The Evil about 1 year ago
Karel Pičman wrote in #note-4:
Here is a patch, that implements the requested feature.
Thanks but FWIW: You may want to update the patch as there's a typo (text_defaut_queue_dapter_changed
) included in the attached patch.
Updated by Marius BĂLTEANU about 1 year ago
- Status changed from New to Resolved
- Assignee set to Marius BĂLTEANU
- Target version changed from 6.0.0 to 5.1.0
- Resolution set to Fixed
Updated by Marius BĂLTEANU about 1 year ago
- Status changed from Resolved to Closed
Updated by Mischa The Evil about 1 year ago
- Status changed from Closed to Reopened
Marius BALTEANU wrote in #note-6:
Feature added in r22360. [...]
I'm not 100% sure, but I think there's a typo included in that commit (s/:asyncs/:async/). I'm also not sure about the intention of the added code-comment (#if Rails.env == 'production'
). Is it a remnant of previous testing or was it intended to be un-commented before committing to show the warning only in production?
Updated by Marius BĂLTEANU about 1 year ago
Mischa The Evil wrote in #note-8:
Marius BALTEANU wrote in #note-6:
Feature added in r22360. [...]
I'm not 100% sure, but I think there's a typo included in that commit (s/:asyncs/:async/). I'm also not sure about the intention of the added code-comment (
#if Rails.env == 'production'
). Is it a remnant of previous testing or was it intended to be un-commented before committing to show the warning only in production?
Thanks Mischa for review my changes, you're right on both issues. I've committed the fixes now.
Updated by Mischa The Evil about 1 year ago
- Status changed from Reopened to Resolved
Updated by Marius BĂLTEANU about 1 year ago
- Status changed from Resolved to Closed
Updated by Jonathan Cormier about 1 year ago
This redmine is the first thing that pops up if you search for the above warning. It would be nice if it could link to a wiki that explains what and how to change this so it's not using :Async
Updated by Jonathan Cormier about 1 year ago
If its that important i'd assume it should be mentioned in https://www.redmine.org/projects/redmine/wiki/RedmineInstall
Updated by ashraf alzyoud about 1 year ago
how we can resolve this ??
plz give us some information
Updated by Mischa The Evil about 1 year ago
Jonathan, ashraf: Redmine relies on Rails ActiveJob for email delivery since Redmine 4.0.0. This has been announced almost five years ago in Redmine 4.0.0, 3.4.7 and 3.3.9 released. Redmine administrators should have handled ActiveJob configuration with that release.
Given that we've seen lots of issues caused by this topic, this enhancement, that provides an admin notice, has been added. You can find more (general) info about Rails ActiveJob (configuration) in this Rails guide.
Additionally, Marius has added an example howto in the wiki that documents the installation and configuration steps for one, widely-used, job queuing library (Sidekiq).
Note: documentation for this topic has been part of the discussion in issue #33589.
Updated by Jonathan Cormier about 1 year ago
Thanks for the links Mischa. Hopefully, it will help others who are googling the new error as well.
Updated by Anthony Cartmell about 1 year ago
I didn't want to install Redis for Sidekiq, so went for SuckerPunch.
cd
<redmine-root>bundle add sucker_punch
cp additional_environment.rb.example additional_environment.rb
(if needed)vi additional_environment.rb
to addconfig.active_job.queue_adapter = :sucker_punch
- restart Redmine
Updated by Jonathan Cormier about 1 year ago
Anthony Cartmell wrote in #note-17:
I didn't want to install Redis for Sidekiq, so went for SuckerPunch.
Note that sucker punch also only stores its jobs in memory so I'd be curious if it's any better than :Async. I too would prefer to not run a Redis server just for emails to work.
Updated by Guillermo ML about 1 year ago
Note that sucker punch also only stores its jobs in memory so I'd be curious if it's any better than :Async. I too would prefer to not run a Redis server just for emails to work.
The author of sucker_punch says that at this point is very similar to AsyncAdapter and he recommends to use it with Rails.
We tried both and stick with AsyncAdapter. We thought that it was overkill to set up a Redis server just to deliver mails and AsyncAdapter works fine.
Updated by ashraf alzyoud about 1 year ago
Jonathan Cormier wrote in #note-16:
Thanks for the links Mischa. Hopefully, it will help others who are googling the new error as well.
Mischa The Evil wrote in #note-15:
Jonathan, ashraf: Redmine relies on Rails ActiveJob for email delivery since Redmine 4.0.0. This has been announced almost five years ago in Redmine 4.0.0, 3.4.7 and 3.3.9 released. Redmine administrators should have handled ActiveJob configuration with that release.
Given that we've seen lots of issues caused by this topic, this enhancement, that provides an admin notice, has been added. You can find more (general) info about Rails ActiveJob (configuration) in this Rails guide.
Additionally, Marius has added an example howto in the wiki that documents the installation and configuration steps for one, widely-used, job queuing library (Sidekiq).Note: documentation for this topic has been part of the discussion in issue #33589.
thx for your replay
1- im note in the example Sidekiq he only configure mailers, in my case im not using email bec im install redmine in my local network, its must configure or no?
2- can i use another queue mailer??
Configure Sidekiq
Create config/sidekiq.yml file inside Redmine directory and set the queues
---
:queues:
- mailers