Zammad runs into timeout then stops fetching new mails

grep '#1074230-180020' -B 25 -A 25 /var/log/zammad/production.log

Mailboxes and triggers (they contain mailbox + department names) redacted.
I’ve also filtered this log to remove unrelated messages next to the grep matches.

I, [2024-11-27T10:23:55.877031#1074230-180020]  INFO -- :  - message 1/1
--
I, [2024-11-27T10:23:56.612335#1074230-180020]  INFO -- : Process email with msgid '<d45d321ff87c7bd6d7aef187250b64f3@client1.tld>'
--
I, [2024-11-27T10:24:10.824358#1074230-180020]  INFO -- : set_attributes_by_x_headers header x-zammad-ticket-customer_id found. Assign customer_id=50610
--
I, [2024-11-27T10:24:12.756812#1074230-180020]  INFO -- : set_attributes_by_x_headers header x-zammad-article-preferences found. Assign preferences={"send-auto-response"=>true, "is-auto-response"=>false}
--
I, [2024-11-27T10:24:27.911266#1074230-180020]  INFO -- : Execute trigger (mb1@example.com: auto reply (on new tickets)/32) for this object (Ticket:281095/Loop:1)
I, [2024-11-27T10:24:35.559937#1074230-180020]  INFO -- : Execute trigger (service@sister-company.example.com - Notiz/38) for this object (Ticket:281095/Loop:1)
--
I, [2024-11-27T10:25:04.832677#1074230-180020]  INFO -- : Do not execute recursive triggers per default until Zammad 3.0. With Zammad 3.0 and higher the following trigger is executed 'service@sister-company.example.com - Notiz' on Ticket:281095. Please review your current triggers and change them if needed.
--
I, [2024-11-27T10:26:28.573709#1074230-180020]  INFO -- : fetching imap (imap.mailbox.org/mb3@example.com port=993,ssl=true,starttls=false,folder=INBOX,keep_on_server=false,auth_type=LOGIN)
--
I, [2024-11-27T10:26:34.392228#1074230-180020]  INFO -- :  - no message
--
I, [2024-11-27T10:26:38.169222#1074230-180020]  INFO -- : fetching imap (imap.mailbox.org/mb2@example.test port=993,ssl=true,starttls=false,folder=INBOX,keep_on_server=false,auth_type=LOGIN)
--
I, [2024-11-27T10:26:44.760731#1074230-180020]  INFO -- :  - no message
I, [2024-11-27T10:26:44.783134#1074230-487080]  INFO -- : ended Stats.generate took: 219.727089582 seconds.
--
I, [2024-11-27T10:26:45.651000#1074230-180020]  INFO -- : fetching imap (imap.mailbox.org/main@holding.example.com port=993,ssl=true,starttls=false,folder=INBOX,keep_on_server=false,auth_type=LOGIN)
--
I, [2024-11-27T10:26:50.317494#1074230-180020]  INFO -- :  - no message
--
I, [2024-11-27T10:26:51.201160#1074230-180020]  INFO -- : fetching imap (imap.mailbox.org/mb1@example.com port=993,ssl=true,starttls=false,folder=INBOX/Zammad,keep_on_server=false,auth_type=LOGIN)
--
I, [2024-11-27T10:26:55.472726#1074230-180020]  INFO -- :  - message 1/2
--
I, [2024-11-27T10:26:56.824959#1074230-180020]  INFO -- : Process email with msgid '<68718820.1db40ac.afb7df1.5a86@client2.tld>'
--
I, [2024-11-27T10:27:16.303995#1074230-180020]  INFO -- : set_attributes_by_x_headers header x-zammad-ticket-customer_id found. Assign customer_id=50611
--
I, [2024-11-27T10:27:22.225704#1074230-180020]  INFO -- : set_attributes_by_x_headers header x-zammad-article-preferences found. Assign preferences={"send-auto-response"=>true, "is-auto-response"=>false}
--
I, [2024-11-27T10:27:38.190828#1074230-180020]  INFO -- : Execute trigger (External Software Support Agent (Service Company TypE)/93) for this object (Ticket:281096/Loop:1)
I, [2024-11-27T10:27:38.261624#1074230-180020]  INFO -- : NOTICE create - self.created_by_id is different: 50611/1
--
I, [2024-11-27T10:27:55.307918#1074230-180020]  INFO -- : Execute trigger (mb1@example.com - Notiz/34) for this object (Ticket:281096/Loop:1)
--
I, [2024-11-27T10:28:46.337342#1074230-180020]  INFO -- : Do not execute recursive triggers per default until Zammad 3.0. With Zammad 3.0 and higher the following trigger is executed 'mb1@example.com - Notiz' on Ticket:281096. Please review your current triggers and change them if needed.
--
I, [2024-11-27T10:29:21.994053#1074230-180020]  INFO -- :  - message 2/2
I, [2024-11-27T10:29:26.947786#1074230-180020]  INFO -- : Process email with msgid '<ec1c9edca2af716dbc4941073ce57d36@example.com>'
I, [2024-11-27T10:29:31.805230#1074230-180020]  INFO -- : set_attributes_by_x_headers header x-zammad-ticket-customer_id found. Assign customer_id=50
I, [2024-11-27T10:29:36.252726#1074230-180020]  INFO -- : set_attributes_by_x_headers header x-zammad-article-sender found Agent
I, [2024-11-27T10:29:36.261798#1074230-180020]  INFO -- : set_attributes_by_x_headers found Ticket::Article::Sender lookup for 'Agent'
I, [2024-11-27T10:29:36.268987#1074230-180020]  INFO -- : set_attributes_by_x_headers assign Ticket::Article sender_id=1
I, [2024-11-27T10:29:36.269113#1074230-180020]  INFO -- : set_attributes_by_x_headers header x-zammad-article-preferences found. Assign preferences={"send-auto-response"=>true, "is-auto-response"=>false}
--
I, [2024-11-27T10:30:01.648077#1074230-180020]  INFO -- : Execute trigger (mb1@example.com - Notiz/34) for this object (Ticket:281097/Loop:1)
--
I, [2024-11-27T10:30:40.536971#1074230-180020]  INFO -- : Do not execute recursive triggers per default until Zammad 3.0. With Zammad 3.0 and higher the following trigger is executed 'mb1@example.com - Notiz' on Ticket:281097. Please review your current triggers and change them if needed.
--
I, [2024-11-27T10:32:15.149920#1074230-180020]  INFO -- : fetching imap (imap.mailbox.org/service@example.com port=993,ssl=true,starttls=false,folder=INBOX,keep_on_server=false,auth_type=LOGIN)
I, [2024-11-27T10:32:24.261930#1074230-180020]  INFO -- :  - no message
I, [2024-11-27T10:32:25.105085#1074230-180020]  INFO -- : fetching imap (imap.mailbox.org/mb2@example.com port=993,ssl=true,starttls=false,folder=INBOX,keep_on_server=false,auth_type=LOGIN)
I, [2024-11-27T10:32:28.875796#1074230-191760]  INFO -- : execute Job.run (try_count 0)...
I, [2024-11-27T10:32:32.765799#1074230-180020]  INFO -- :  - message 1/4
I, [2024-11-27T10:32:37.405670#1074230-180020]  INFO -- : Process email with msgid '<6746e4d0ac496_280ac2183e433362@client4.tld>'
--
I, [2024-11-27T10:32:40.417100#1074230-180020]  INFO -- : set_attributes_by_x_headers header x-zammad-ticket-customer_id found. Assign customer_id=28589
--
I, [2024-11-27T10:32:46.347006#1074230-180020]  INFO -- : set_attributes_by_x_headers header x-zammad-article-preferences found. Assign preferences={"send-auto-response"=>true, "is-auto-response"=>false}
--
I, [2024-11-27T10:33:04.930132#1074230-180020]  INFO -- : Execute trigger (mb2: auto reply (on new tickets)/1) for this object (Ticket:281098/Loop:1)
--
E, [2024-11-27T10:35:37.796895#1074230-180020] ERROR -- : Can't process email. Run the following command to get the message for issue report at https://github.com/zammad/zammad/issues:
  zammad run rails r "puts FailedEmail.find(112).data"
E, [2024-11-27T10:35:37.796963#1074230-180020] ERROR -- : execution expired (Timeout::Error)
app/models/channel/email_parser.rb:151:in `process_with_timeout'
app/models/channel/email_parser.rb:131:in `process'
app/models/channel/driver/imap.rb:359:in `block in fetch'
app/models/channel/driver/imap.rb:295:in `each'
app/models/channel/driver/imap.rb:295:in `fetch'
app/models/channel.rb:64:in `fetch'
app/models/channel.rb:36:in `fetch'
(eval):1:in `eval_job_method'
lib/background_services/service/process_scheduled_jobs/job_executor.rb:48:in `eval'
lib/background_services/service/process_scheduled_jobs/job_executor.rb:48:in `eval_job_method'
lib/background_services/service/process_scheduled_jobs/job_executor.rb:23:in `execute'
lib/background_services/service/process_scheduled_jobs/job_executor/continuous.rb:16:in `block in run_loop'
lib/background_services/service/process_scheduled_jobs/job_executor/continuous.rb:15:in `times'
lib/background_services/service/process_scheduled_jobs/job_executor/continuous.rb:15:in `run_loop'
lib/background_services/service/process_scheduled_jobs/job_executor/continuous.rb:8:in `run'
lib/background_services/service/process_scheduled_jobs/job_executor.rb:10:in `run'
lib/background_services/service/process_scheduled_jobs/manager.rb:84:in `block in start_in_thread'
lib/application_handle_info.rb:19:in `use'
lib/background_services/service/process_scheduled_jobs/manager.rb:82:in `start_in_thread'
lib/background_services/service/process_scheduled_jobs/manager.rb:73:in `block (2 levels) in start'
lib/background_services/service/process_scheduled_jobs/manager.rb:72:in `block in start'
I, [2024-11-27T10:35:37.863460#1074230-180020]  INFO -- :  - message 2/4
I, [2024-11-27T10:35:42.802481#1074230-180020]  INFO -- : Process email with msgid '<79e4cab148668d291ba79766169c0415@example.com>'
I, [2024-11-27T10:35:45.747281#1074230-180020]  INFO -- : set_attributes_by_x_headers header x-zammad-ticket-customer_id found. Assign customer_id=6
--
I, [2024-11-27T10:35:55.202680#1074230-499400]  INFO -- : ended Ticket.process_auto_unassign took: 6.322070886 seconds.
I, [2024-11-27T10:35:55.337762#1074230-180020]  INFO -- : set_attributes_by_x_headers header x-zammad-article-sender found Agent
I, [2024-11-27T10:35:55.349654#1074230-180020]  INFO -- : set_attributes_by_x_headers found Ticket::Article::Sender lookup for 'Agent'
I, [2024-11-27T10:35:56.044152#1074230-180020]  INFO -- : set_attributes_by_x_headers assign Ticket::Article sender_id=1
--
I, [2024-11-27T10:35:56.753135#1074230-180020]  INFO -- : set_attributes_by_x_headers header x-zammad-article-preferences found. Assign preferences={"send-auto-response"=>true, "is-auto-response"=>false}
--
E, [2024-11-27T10:38:45.195782#1074230-180020] ERROR -- : Failed enqueuing TicketUserTicketCounterJob to DelayedJob(default): Timeout::ExitException (execution expired)
E, [2024-11-27T10:38:51.415731#1074230-180020] ERROR -- : Can't process email. Run the following command to get the message for issue report at https://github.com/zammad/zammad/issues:
  zammad run rails r "puts FailedEmail.find(113).data"
E, [2024-11-27T10:38:51.415796#1074230-180020] ERROR -- : execution expired (Timeout::Error)
app/models/channel/email_parser.rb:151:in `process_with_timeout'
app/models/channel/email_parser.rb:131:in `process'
app/models/channel/driver/imap.rb:359:in `block in fetch'
app/models/channel/driver/imap.rb:295:in `each'
app/models/channel/driver/imap.rb:295:in `fetch'
app/models/channel.rb:64:in `fetch'
app/models/channel.rb:36:in `fetch'
(eval):1:in `eval_job_method'
lib/background_services/service/process_scheduled_jobs/job_executor.rb:48:in `eval'
lib/background_services/service/process_scheduled_jobs/job_executor.rb:48:in `eval_job_method'
lib/background_services/service/process_scheduled_jobs/job_executor.rb:23:in `execute'
lib/background_services/service/process_scheduled_jobs/job_executor/continuous.rb:16:in `block in run_loop'
lib/background_services/service/process_scheduled_jobs/job_executor/continuous.rb:15:in `times'
lib/background_services/service/process_scheduled_jobs/job_executor/continuous.rb:15:in `run_loop'
lib/background_services/service/process_scheduled_jobs/job_executor/continuous.rb:8:in `run'
lib/background_services/service/process_scheduled_jobs/job_executor.rb:10:in `run'
lib/background_services/service/process_scheduled_jobs/manager.rb:84:in `block in start_in_thread'
lib/application_handle_info.rb:19:in `use'
lib/background_services/service/process_scheduled_jobs/manager.rb:82:in `start_in_thread'
lib/background_services/service/process_scheduled_jobs/manager.rb:73:in `block (2 levels) in start'
lib/background_services/service/process_scheduled_jobs/manager.rb:72:in `block in start'
--
I, [2024-11-27T10:38:53.084618#1074230-180020]  INFO -- :  - message 3/4
--
I, [2024-11-27T10:38:58.428833#1074230-180020]  INFO -- : Process email with msgid '<1850cf41-a5b8-42de-9cdf-073c7b4a8aad@client3.tld'
--
I, [2024-11-27T10:39:00.499220#1074230-180020]  INFO -- : set_attributes_by_x_headers header x-zammad-ticket-customer_id found. Assign customer_id=8991
--
I, [2024-11-27T10:39:06.586762#1074230-180020]  INFO -- : set_attributes_by_x_headers header x-zammad-article-preferences found. Assign preferences={"send-auto-response"=>true, "is-auto-response"=>false}
--
I, [2024-11-27T10:39:27.691220#1074230-180020]  INFO -- : Execute trigger (mb2: auto reply (on new tickets)/1) for this object (Ticket:281100/Loop:1)
--
I, [2024-11-27T10:40:17.562186#1074230-180020]  INFO -- : Execute trigger (STEX: Rechnung bezahlt/11) for this object (Ticket:281100/Loop:1)
--
E, [2024-11-27T10:41:55.940786#1074230-180020] ERROR -- : Can't process email. Run the following command to get the message for issue report at https://github.com/zammad/zammad/issues:
  zammad run rails r "puts FailedEmail.find(114).data"
E, [2024-11-27T10:41:55.953825#1074230-180020] ERROR -- : execution expired (Timeout::Error)
app/models/channel/email_parser.rb:151:in `process_with_timeout'
app/models/channel/email_parser.rb:131:in `process'
app/models/channel/driver/imap.rb:359:in `block in fetch'
app/models/channel/driver/imap.rb:295:in `each'
app/models/channel/driver/imap.rb:295:in `fetch'
app/models/channel.rb:64:in `fetch'
app/models/channel.rb:36:in `fetch'
(eval):1:in `eval_job_method'
lib/background_services/service/process_scheduled_jobs/job_executor.rb:48:in `eval'
lib/background_services/service/process_scheduled_jobs/job_executor.rb:48:in `eval_job_method'
lib/background_services/service/process_scheduled_jobs/job_executor.rb:23:in `execute'
lib/background_services/service/process_scheduled_jobs/job_executor/continuous.rb:16:in `block in run_loop'
lib/background_services/service/process_scheduled_jobs/job_executor/continuous.rb:15:in `times'
lib/background_services/service/process_scheduled_jobs/job_executor/continuous.rb:15:in `run_loop'
lib/background_services/service/process_scheduled_jobs/job_executor/continuous.rb:8:in `run'
lib/background_services/service/process_scheduled_jobs/job_executor.rb:10:in `run'
lib/background_services/service/process_scheduled_jobs/manager.rb:84:in `block in start_in_thread'
lib/application_handle_info.rb:19:in `use'
lib/background_services/service/process_scheduled_jobs/manager.rb:82:in `start_in_thread'
lib/background_services/service/process_scheduled_jobs/manager.rb:73:in `block (2 levels) in start'
lib/background_services/service/process_scheduled_jobs/manager.rb:72:in `block in start'
I, [2024-11-27T10:41:56.053743#1074230-180020]  INFO -- :  - message 4/4
--
I, [2024-11-27T10:42:14.903151#1074230-180020]  INFO -- : Process email with msgid '<BEUP281MB3528F7CAF7440A1F77B8731CDE282@CLIENT4.tld>'
I, [2024-11-27T10:42:17.020027#1074230-180020]  INFO -- : set_attributes_by_x_headers header x-zammad-ticket-customer_id found. Assign customer_id=9348
I, [2024-11-27T10:42:22.929867#1074230-180020]  INFO -- : set_attributes_by_x_headers header x-zammad-article-preferences found. Assign preferences={"send-auto-response"=>true, "is-auto-response"=>false}
--
I, [2024-11-27T10:42:50.921149#1074230-180020]  INFO -- : Execute trigger (mb2: auto reply (on new tickets)/1) for this object (Ticket:281101/Loop:1)