Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zammad stops fetching E-Mails || Zammad scheduler not working correctly #404

Closed
Fernien opened this issue Apr 3, 2024 · 2 comments
Closed

Comments

@Fernien
Copy link

Fernien commented Apr 3, 2024

Infos

  • Docker version: 26.0.0, build 2ae903e
  • Docker-compose version: v2.25.0
  • Operating system (Docker host): Debian GNU/Linux 12 (bookworm)

Expected behavior

  • Always keeps fetching and downloading new E-Mails
  • Clean health check in Monitoring Tab

Actual behavior

*Zammad stops fetching new E-Mails almost every day
*Monitoring Tab never clean. Cannot get rid of "scheduler may not run (last execution of CacheClearJob.perform_now 9 days ago) - please contact your system administrator". "Channel: Email::Account in is active but not fetched for about XX hours" coming daily

All i can find are these log entries but i have no idea how to fix them or what the exact problem is

zammad-scheduler-1 | E, [2024-04-03T07:02:12.611619#1-340820] ERROR -- : Can't reconnect to database #<ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use>
zammad-scheduler-1 | E, [2024-04-03T07:02:13.611186#1-340800] ERROR -- : execute DataPrivacyTaskJob.perform_now (try_count 7) exited with error #<ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use> in: 5.000230764 seconds.
zammad-scheduler-1 | E, [2024-04-03T07:02:17.595606#1-328740] ERROR -- : execute Sessions.jobs (try_count 10) exited with error #<ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use> in: 5.000245081 seconds.
zammad-scheduler-1 | E, [2024-04-03T07:02:17.625294#1-352840] ERROR -- : execute Ticket.process_pending (try_count 4) exited with error #<ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use> in: 5.000236675 seconds.
zammad-scheduler-1 | E, [2024-04-03T07:02:18.601090#1-334760] ERROR -- : execute Ticket.process_auto_unassign (try_count 9) exited with error #<ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use> in: 5.000257424 seconds.
zammad-scheduler-1 | E, [2024-04-03T07:02:18.611410#1-340800] ERROR -- : Can't reconnect to database #<ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use>
zammad-scheduler-1 | E, [2024-04-03T07:02:18.626268#1-352860] ERROR -- : execute Stats.generate (try_count 4) exited with error #<ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use> in: 5.00024512 seconds.
zammad-scheduler-1 | E, [2024-04-03T07:02:19.601629#1-334780] ERROR -- : execute ExternalCredential::Exchange.refresh_token (try_count 9) exited with error #<ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use> in: 5.000267743 seconds.
zammad-scheduler-1 | E, [2024-04-03T07:02:19.626952#1-352880] ERROR -- : execute Chat.cleanup_close (try_count 4) exited with error #<ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use> in: 5.000269346 seconds.
zammad-scheduler-1 | E, [2024-04-03T07:02:22.595865#1-328740] ERROR -- : Can't reconnect to database #<ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use>
zammad-scheduler-1 | E, [2024-04-03T07:02:22.596004#1-328740] ERROR -- : Failed to run Sessions.jobs after 11 tries.
zammad-scheduler-1 | E, [2024-04-03T07:02:22.625502#1-352840] ERROR -- : Can't reconnect to database #<ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use>
zammad-scheduler-1 | E, [2024-04-03T07:02:23.601358#1-334760] ERROR -- : Can't reconnect to database #<ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use>
zammad-scheduler-1 | E, [2024-04-03T07:02:23.626536#1-352860] ERROR -- : Can't reconnect to database #<ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use>

Steps to reproduce the behavior

I'm not completely sure how to reproduce it since the fetching just stops working seemingly randomly. The log errors are after a fresh installation

I added vm.max_map_count=262144 to sysctl.conf. I have the same problem on 2 different host systems with 2 different zammad installations. Zammad Version 6.4.x

@mgruner
Copy link
Collaborator

mgruner commented Apr 3, 2024

@Fernien thanks for your report. If you want to use Zammad 6.4.x, you need to include the changes from #402 in your deployment. Specifically the POSTGRESQL_OPTIONS with the explicit setting of the database pool size. Please let us know if it works for you.

I'm closing this issue as it is not about a supported Zammad version.

@mgruner mgruner closed this as completed Apr 3, 2024
@Fernien
Copy link
Author

Fernien commented Apr 4, 2024

@Fernien thanks for your report. If you want to use Zammad 6.4.x, you need to include the changes from #402 in your deployment. Specifically the POSTGRESQL_OPTIONS with the explicit setting of the database pool size. Please let us know if it works for you.

I'm closing this issue as it is not about a supported Zammad version.

It seems to have solved the prolems. Thanks for the quick help and sorry for the inconvenience

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants