Long loading times when viewing E-Mail Tickets with 100 Mails

Infos:

  • Used Zammad version: 5.2.1
  • Used Zammad installation type: package
  • Operating system: Server: Ubuntu 20.04 / Client: Windows 10
  • Browser + version: Firefox 103.0.1

Host CPU: AMD EPYC 7532 32-Core Processor
VM: 2 vCPU cores
RAM: 8 GB
Memcached with 1 GB
Agent: 1
PostgreSQL 12

Expected behavior:

  • Open large E-Mail tickets fast

Actual behavior:

  • Long loading times when viewing E-Mail Tickets with 100 Mails

Steps to reproduce the behavior:

  • Happens when opening a ticket with 100 mails

Further info:

/var/log/zammad/production.log

I, [2022-08-04T13:49:29.733773 #59004-2209160]  INFO -- : Started GET "/api/v1/tickets/121?all=true&_=1659613464536" for 192.168.168.44 at 2022-08-04 13:49:29 +0200
I, [2022-08-04T13:49:29.740128 #59004-2208940]  INFO -- : Processing by TaskbarController#create as JSON
I, [2022-08-04T13:49:29.740225 #59004-2208940]  INFO -- :   Parameters: {"key"=>"Ticket-121", "client_id"=>123, "callback"=>"TicketZoom", "params"=>{"ticket_id"=>"121", "shown"=>true}, "prio"=>3, "notify"=>false, "active"=>true, "id"=>"c
-9"}
I, [2022-08-04T13:49:29.742805 #59004-2209160]  INFO -- : Processing by TicketsController#show as JSON
I, [2022-08-04T13:49:29.742894 #59004-2209160]  INFO -- :   Parameters: {"all"=>"true", "_"=>"1659613464536", "id"=>"121"}
I, [2022-08-04T13:49:29.779288 #59004-2208940]  INFO -- : Completed 201 Created in 39ms (Views: 0.5ms | ActiveRecord: 14.4ms | Allocations: 15412)
I, [2022-08-04T13:49:31.737379 #59004-2210240]  INFO -- : Started PUT "/api/v1/taskbar/1679" for 192.168.168.44 at 2022-08-04 13:49:31 +0200
I, [2022-08-04T13:49:31.758999 #59004-2210240]  INFO -- : Processing by TaskbarController#update as JSON
I, [2022-08-04T13:49:31.759111 #59004-2210240]  INFO -- :   Parameters: {"key"=>"Search", "client_id"=>"123", "callback"=>"Search", "state"=>{}, "params"=>{"query"=>"121", "shown"=>true}, "prio"=>2, "notify"=>false, "active"=>false, "att
achments"=>[], "updated_at"=>"2022-08-04T11:49:20.317Z", "id"=>"1679"}
I, [2022-08-04T13:49:32.419490 #59004-2210240]  INFO -- : Completed 200 OK in 396ms (Views: 0.5ms | ActiveRecord: 372.5ms | Allocations: 79427)
I, [2022-08-04T13:50:11.267255 #59004-2209160]  INFO -- : Completed 200 OK in 41521ms (Views: 3392.1ms | ActiveRecord: 129.7ms | Allocations: 7215760)

vmstat shows that 1 processor core is 100% utilized. No io or iowait. Approx. 1.5 GB RAM is free.

procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache     si   so    bi    bo   in   cs us sy id wa st
 0  0      0 1540140 591676 2951560    0    0     0     8  291  493  1  0 99  0  0
 1  0      0 1540448 591676 2951560    0    0     0    40  588  961 35  1 64  0  0
 1  0      0 1540464 591676 2951560    0    0     0     0  480  412 50  1 49  0  0
 1  0      0 1540464 591676 2951560    0    0     0    40  522  604 50  0 49  0  0
 1  0      0 1540464 591676 2951560    0    0     0     8  453  398 50  1 49  0  0
 1  0      0 1540464 591676 2951560    0    0     0     0  480  393 51  0 50  0  0
 2  0      0 1540464 591676 2951560    0    0     0     0  490  432 50  1 50  0  0
 1  0      0 1540464 591676 2951560    0    0     0     0  512  502 50  1 50  0  0
 1  0      0 1540464 591676 2951560    0    0     0     0  491  429 50  0 50  0  0
 1  0      0 1540464 591676 2951560    0    0     0    24  498  437 50  1 50  0  0
 1  0      0 1540464 591676 2951560    0    0     0     0  490  432 50  0 49  0  0
 1  0      0 1540432 591676 2951560    0    0     0     0  501  443 50  1 50  0  0
 1  0      0 1540432 591676 2951560    0    0     0     0  485  422 51  0 49  0  0
...

The web browser immediately displays the ticket as soon as the ruby rails process finishes after more than 40 seconds.

See attachment “browser dev console”:

We tried setting WEB_CONCURRENCY and ZAMMAD_SESSION_JOBS_CONCURRENT to 2 to see if ruby/rails would then use both CPU cores. But it stayed with one CPU core.

We do not see any problems in the PostgreSQL log.

zammad run rails r “p Delayed::Job.last”: nil
zammad run rails r “p Delayed::Job.count”: 0
zammad run rails r “p Delayed::Job.first”: nil

Is there a setting that the ruby/rails process uses more than one CPU core? Is this even possible or does it have to run on a single CPU core?

Is there a feature planned for the ticket view with the option to show only the last email? The other mails are only displayed as a list (sender, subject, date…) and these are only loaded on click.

Related: Big Ticket needs to load over 30 sec

1 Like

A ticket with 100 articles, even if they’re fairly small without a lot of images will always take fairly long to load. The reason for that is not Zammad and it’s server but mainly browsers. 100 article add a lot of HTML structure to the content which most browsers don’t like at all. This makes them go laggy.

Thanks for the reply.

Is there a feature planned for the ticket view with the option to show only the last article/email? The other articles/mails are only displayed as a list (sender, subject, date…) and these are only loaded on click.

Would such a feature even be considered?

1 Like

I can’t provide any information on planned functions / roadmaps.

If that’s something of interest, the best idea is always to make sure there isn’t already a feature request, and if there is, heart it, and if there isn’t make one.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.