Zammad 7.0.0: Channel.fetch_async only fetches active Email::Account-Channels partly, manual Channel.find(ID).fetch works

This version 7 has been a nightmare for us, the scheduler barely works. Email fetching is very brittle.

The Zammad 7 instance I’m running has medium traffic and not a single problem. It’s a package installation though. Maybe the docker based installations are more sensitive. I have no performance tunings active in terms of the background worker.

Hard to tell, it might depend on the environment in general.

@ggruening Yes and no. The monitoring endpoint is your best bet.

While it begins screaming after an hour “only”, there is situations where this delay might be “okay” or reasonable. Even with very busy instances it might be.

You can check on rails level, when the Channel(s) where updated last. Email channels (apart from the notification channels) are always updated when they’re done fetching (no matter if successful or not). You could also query the preferences, but last_updated is easier.

Below works on every installation type. Add zammad run for package and the fitting docker based terms in front of below for maximum profit. You want to execute this against the rails server.

rails r 'p Channel.where(active: true).where.not(area: "Email::Notification").where("updated_at < ?", Time.now  - 10.minutes).count'

Fair word of warning:
Check once per minute (that’s by far enough), do not reduce the time limit too much. I wouldn’t suggest less than 5 minutes to reduce false positives. Above will always return 0, unless you have n channels not being updated within 10 minutes.

The current plan is also that we have the backport available in general in stable. So you can keep in eye on it during the week.

Maybe the docker based installations are more sensitive.

I am indeed using a docker compose-based installation here. And I’ve only had this problem in my environment since upgrading to version 7. Perhaps that will help with the analysis.

rails r ‘p Channel.where(active: true).where.not(area: “Email::Notification”).where(“updated_at < ?”, Time.now - 10.minutes).count’

@MrGeneration Thanks, that should be work. The compose version is, by the way:

docker compose exec zammad-railsserver bundle exec rails r 'p Channel.where(active: true).where.not(area: "Email::Notification").where("updated_at < ?", Time.now  - 10.minutes).count'

Perhaps this will help someone here in the community.

The current plan is also that we have the backport available in general in stable. So you can keep in eye on it during the week.

@dominikklein
Very good news! Thanks a lot!

Best regards!

Just a quick heads up. The fix is now backported to stable 7.0.*. Packages should show up any time.

1 Like

No more problems with the channels for the past two days. Wonderful. Thank you for your work, @mantas !

1 Like