redmine_mail_reminder
                                
                                 redmine_mail_reminder copied to clipboard
                                
                                    redmine_mail_reminder copied to clipboard
                            
                            
                            
                        cpu usage %100
my crontab entry is
0 8 * * 1-5 cd /usr/share/redmine/ && /usr/local/bin/rake reminder:exec RAILS_ENV="production"
but we have cpu starving processes
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root     10085 95.3  2.8 344240 116820 ?       Rl   Kas17 10110:07 ruby1.9.1 /usr/local/bin/rake reminder:exec RAILS_ENV=production
root     13569 75.8  2.8 344120 117056 ?       Rl   Kas23 1486:22 ruby1.9.1 /usr/local/bin/rake reminder:exec RAILS_ENV=production
root     15802 94.6  2.8 340928 113764 ?       Rl   Kas18 8670:01 ruby1.9.1 /usr/local/bin/rake reminder:exec RAILS_ENV=production
root     19673 65.8  2.8 344252 117116 ?       Rl   08:00 341:53 ruby1.9.1 /usr/local/bin/rake reminder:exec RAILS_ENV=production
root     21562 93.6  2.8 340928 113752 ?       Rl   Kas19 7231:21 ruby1.9.1 /usr/local/bin/rake reminder:exec RAILS_ENV=production
root     30296 92.2  2.8 344136 117060 ?       Rl   Kas20 5791:13 ruby1.9.1 /usr/local/bin/rake reminder:exec RAILS_ENV=production
............................
which makes the plugin useless for us. Please recommend a solution.
@soncu
The CPU loading may be due to premailer CSS render. Disable CSS render by remove
app/views/mail_reminder_mailer/issues_reminder.html.erb:5
<% headers[:skip_premailer] = nil if headers[:skip_premailer] %>
and try again. On the other hand, the email content will not present in site's CSS styles anymore.
Let me know if it works or not, thanks.
Having the same issue, removing the CSS renderer didn't help. rake reminder:exec RAILS_ENV="production" appears to never terminate.
@mphilipps when render mail for each user it takes cpu to embedded css effect into mail html code, which may take few seconds to 10+ seconds for each user. If you have many users on site then you should send notification at midnight or less frequent.
We have something like ~150 users and I killed the script after 2hours with disabled css renderer.
Same happens here,
Script never stops and uses 100% cpu. These are script's output:
/opt/redmine/current/script/redmine_reminder.sh: line 3: 60514 Killed                  /home/redmine_admin/.rvm/gems/ruby-2.0.0-p576/bin/rake reminder:exec RAILS_ENV="production" /opt/redmine/current/script/redmine_reminder.sh: line 3: 42509 Killed                  /home/redmine_admin/.rvm/gems/ruby-2.0.0-p576/bin/rake reminder:exec RAILS_ENV="production"
Got an answer for this precise problem, and a fix.
The problem seems to stem from a reminder that exists in a project with issue_reminders not activated. (maybe a problem with reminder.rake:8 ?)
Moreover, this was the case because of a reminder delete that went wrong. I deleted a reminder from the GUI once, and deactivated the reminder plugin from the project and the plugin went nuts ! The reminder still existed in DB, and when the plugin tried to verify the modules enabled, it bugged.
When I deleted this reminder, everything went back to normal.
I hope this helps !