Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

General discussion
  1. OpenProject
  2. Forums
  3. General discussion
  4. Email Notification Not going when updating workpackage

Email Notification Not going when updating workpackage

Added by Ashutosh Sharma about 10 years ago

I am facing an issue, where email notifications are not going when a work package is update. I have checked the user settings has been set to receive all the notification. I get notification for creation of a new work package, but if I update a work package then I am not receiving any notification. Adding myself to watcher list also doesn’t help. Please help me out here.

OP Version: 4.0.8

Let me know if you need any more details here.


Replies (8)

RE: Email Notification Not going when updating workpackage - Added by Robin Wagner about 10 years ago

Hi Ashutosh,

sorry for the late reply.
Emails for work package updates are send out asynchronously via delayed_job. This is probably not configured / activated.
Do you use the packager installation or the manual installation?
Please have a look at the following thread which addresses this problem:
https://community.openproject.org/topics/4134?board_id=9&r=4186#message-4186

Best,
Robin

RE: Email Notification Not going when updating workpackage - Added by Ashutosh Sharma about 10 years ago

Hi Robin,

I have manual installation. I have gone through the link you mentioned. I started the delayed job, but still the notifications are not working. Here the output of the commands

RAILS_ENV=production bundle exec script/delayed_job start*

require ‘rails/all’… 0.400s
Bundler.require… DEPRECATION WARNING: All functionality provided by openproject-plugins has now been integrated in OpenProject core.
Please remove openproject-plugins from your Gemfile."
(called from <top (required)> at /home/openproject/.rvm/gems/ruby-2.1.4/bundler/gems/openproject-plugins-25953acb850e/lib/openproject-plugins.rb:16)
1.120s
Application.initialize!… [deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
/home/openproject/.rvm/gems/ruby-2.1.4/gems/svg-graph-1.0.5/lib/SVG/Graph/Graph.rb:3: warning: class variable access from toplevel
2.720s


**ps ax | grep delayed**

17271 ? Sl 0:00 delayed_job
17288 ? S 0:00 grep —color=auto delayed

I waited for more than an hour, but still no email notification.

Interesting point it I get email only for new task and not for updates. As I mentioned earlier I has set to receive all notifications. But still the issue.

Also are there any specific configuration that needs to be done for delayed job, Please let me know what are those or where I can find it.
Let me know if you need any more details. Due to this issue, we have to email the team member if any updates are done, causing unnecessary delays.

Thanks,
Ashutosh

RE: Email Notification Not going when updating workpackage - Added by Jonas Heinrich (Finn) about 10 years ago

Hi Ashutosh,

could you please run RAILS_ENV=production bundle exec script/delayed_job run --exit-on-complete and tell me the output?

Thanks,

Jonas

RE: Email Notification Not going when updating workpackage - Added by Ashutosh Sharma about 10 years ago

Hi Jonas,

I was able to figure out the issue. The issue was that there were 35k+ entries in the delayed_job table in the database. After clearing it, I am able to get the notification for all the updates. So I guess, following can be added as troubleshooting steps:

# Check for the setup in the Configuration.yml

# Check for the delayed_job status

ps ax | grep delayed

. If there is no entry for “delayed_job” then start it by running

RAILS_ENV=production bundle exec script/delayed_job start

# Check the result of

RAILS_ENV=production bundle exec script/delayed_job run --exit-on-complete
  1. Check the delayed_jobs table in the open project DB, for any large number of stuck jobs. Delete all the records. Ideally it should be zero.

You can add details to the troubleshooting steps above.

Thanks a lot.

Thanks,
Ashutosh

RE: Email Notification Not going when updating workpackage - Added by Ashutosh Sharma about 10 years ago

That didn’t helped. After sometime the emails stopped going. And When I saw the delayed_jobs table it had 176 tasks and the error text for them was

454 4.7.0 Too many login attempts, please try again later. ve3sm833387pbc.22 - gsmtp

Even I have “Allow Less secure app” setting allowed on gmail account.

Please let me know if something is wrong in the settings. I am pasting the Configuration.yml details

 production:
   email_delivery_method: :smtp
   smtp_enable_starttls_auto: true
   smtp_address: "smtp.gmail.com"
   smtp_port: 587
   smtp_domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
   smtp_authentication: :plain
   smtp_user_name: "xxxxxx@gmail.com"
   smtp_password: "*****"


# default configuration options for all environments
default:
  # Outgoing emails configuration (see examples above)
  email_delivery_method: :smtp
  smtp_enable_starttls_auto: true
  smtp_address: "smtp.gmail.com"
  smtp_port: 587
  smtp_domain: "smtp.gmail.com"
  smtp_authentication: :plain
  smtp_user_name: "xxxxxx@gmail.com"
  smtp_password: "*****"

  disable_browser_cache: false
 session_store: :cache_store

 development:
  email_delivery_method: :letter_opener

# Configuration for the test environment
test:
  email_delivery_method: :production

rails_cache_store: :memcache

Thanks,
Ashutosh

RE: Email Notification Not going when updating workpackage - Added by Ashutosh Sharma about 10 years ago

On further investigation and looking for the specific error, it seems that Gmail is blocking the request if multiple login requests are being made in small interval of time. All our OP user had the settings to receive for the changes they have done. Due to which it was generating huge email jobs in delayed_jobs table. After turning on the setting “Do not send notification for which I do changes”, the number of emails generated is reduced and notifications are getting flowed now. We have not seen the issue today. But will still monitor it for a day or so. But this is not permanent solution because if large number of user updates the different work packages and each is having watcher then it will stuck again.

From all this what I can guess is for each email to be send OP is opening a new connection to Gmail, authenticating and then sending email. So if a huge number of emails needs to be sent, then OP will do the same process again and again. This can be one of the reason why Gmail is blocking the requests considering a DOS Attack. A better approach would be to open the connection with SMTP server once and then sends all the emails. A further optimization can be to keep the channel open for configurable amount of time before creating a new connection to reduce the resource usage.

RE: Email Notification Not going when updating workpackage - Added by Jonas Heinrich (Finn) about 10 years ago

Hi Ashutosh,

I think you’re right about the false handling of emails within OpenProject. But the most I can do now is to create ticket: #19443.

Everythings else worked for you?

Best,

Jonas

RE: Email Notification Not going when updating workpackage - Added by Ashutosh Sharma about 10 years ago

Hi Jonas,

Everything else is working fine.

I just checked the ticket created, if I am correct, the ticket is about having a setting to define the frequency of the delayed_jobs?

In case it was different, let me put it again:
OP should run the delayed_jobs at set time interval, check for the task in delayed_jobs table. Open the connection with SMTP server, authenticate, send all the emails from the delayed_jobs table and in the end close the SMTP server connection. Follow the same process for next run.

Thanks,
Ashutosh

  • (1 - 8/8)
Loading...