Update.html and ModifyPeople.html - server response time issue (RT5.0.1)

Hello,

I am new here and need your help :slight_smile:

We recently did a migration from RT 4.4.2 > RT 5.0.1 (ubuntu apt repo install) and after that have issue with Ticket/Update.html (e.g. reply to ticket) and with page reload of People on tickets. (Ticket/ModifyPeople.html).
In both cases, page loading takes over 5 seconds, which was not the case with version 4.4.2.

I noticed that, this response time match with duration query (SELECT FOR UPDATE) in postgres logs. Is it a normal behavior for the same ticket, to lock ticket id more times in a few milliseconds?

2024-06-07 12:50:03.596 CEST [3297483-85] 127.0.0.1 rtuser@rt5 LOG:  00000: duration: 0.029 ms  parse <unnamed>: SELECT * FROM Tickets WHERE id = $1 FOR UPDATE
2024-06-07 12:50:03.596 CEST [3297483-86] 127.0.0.1 rtuser@rt5 LOCATION:  exec_parse_message, postgres.c:1566
2024-06-07 12:50:03.596 CEST [3297483-87] 127.0.0.1 rtuser@rt5 LOG:  00000: duration: 0.074 ms  bind <unnamed>: SELECT * FROM Tickets WHERE id = $1 FOR UPDATE
2024-06-07 12:50:03.596 CEST [3297483-88] 127.0.0.1 rtuser@rt5 DETAIL:  parameters: $1 = '932887'
2024-06-07 12:50:03.596 CEST [3297483-89] 127.0.0.1 rtuser@rt5 LOCATION:  exec_bind_message, postgres.c:2025
2024-06-07 12:50:03.596 CEST [3297483-90] 127.0.0.1 rtuser@rt5 LOG:  00000: duration: 0.022 ms  execute <unnamed>: SELECT * FROM Tickets WHERE id = $1 FOR UPDATE
2024-06-07 12:50:03.596 CEST [3297483-91] 127.0.0.1 rtuser@rt5 DETAIL:  parameters: $1 = '932887'

The same process (SELECT FOR UPDATE) again for the same ticket id = 932887 after few millisec.

2024-06-07 12:50:03.614 CEST [3297483-125] 127.0.0.1 rtuser@rt5 LOG:  00000: duration: 0.028 ms  parse <unnamed>: SELECT * FROM Tickets WHERE id = $1 FOR UPDATE
2024-06-07 12:50:03.614 CEST [3297483-126] 127.0.0.1 rtuser@rt5 LOCATION:  exec_parse_message, postgres.c:1566
2024-06-07 12:50:03.614 CEST [3297483-127] 127.0.0.1 rtuser@rt5 LOG:  00000: duration: 0.059 ms  bind <unnamed>: SELECT * FROM Tickets WHERE id = $1 FOR UPDATE
2024-06-07 12:50:03.614 CEST [3297483-128] 127.0.0.1 rtuser@rt5 DETAIL:  parameters: $1 = '932887'
2024-06-07 12:50:03.614 CEST [3297483-129] 127.0.0.1 rtuser@rt5 LOCATION:  exec_bind_message, postgres.c:2025
2024-06-07 12:50:03.614 CEST [3297483-130] 127.0.0.1 rtuser@rt5 LOG:  00000: duration: 0.016 ms  execute <unnamed>: SELECT * FROM Tickets WHERE id = $1 FOR UPDATE
2024-06-07 12:50:03.614 CEST [3297483-131] 127.0.0.1 rtuser@rt5 DETAIL:  parameters: $1 = '932887' 

And once more with new process ID [3297492- ]:

2024-06-07 12:50:03.712 CEST [3297492-71] 127.0.0.1 rtuser@rt5 LOG:  00000: duration: 0.028 ms  parse <unnamed>: SELECT * FROM Tickets WHERE id = $1 FOR UPDATE
2024-06-07 12:50:03.712 CEST [3297492-72] 127.0.0.1 rtuser@rt5 LOCATION:  exec_parse_message, postgres.c:1566
2024-06-07 12:50:03.712 CEST [3297492-73] 127.0.0.1 rtuser@rt5 LOG:  00000: duration: 0.056 ms  bind <unnamed>: SELECT * FROM Tickets WHERE id = $1 FOR UPDATE
2024-06-07 12:50:03.712 CEST [3297492-74] 127.0.0.1 rtuser@rt5 DETAIL:  parameters: $1 = '932887'
2024-06-07 12:50:03.712 CEST [3297492-75] 127.0.0.1 rtuser@rt5 LOCATION:  exec_bind_message, postgres.c:2025
2024-06-07 12:50:16.888 CEST [3297492-76] 127.0.0.1 rtuser@rt5 LOG:  00000: duration: 13175.469 ms  execute <unnamed>: SELECT * FROM Tickets WHERE id = $1 FOR UPDATE
2024-06-07 12:50:16.888 CEST [3297492-77] 127.0.0.1 rtuser@rt5 DETAIL:  parameters: $1 = '932887'
2024-06-07 12:50:16.888 CEST [3297492-78] 127.0.0.1 rtuser@rt5 LOCATION:  exec_execute_message, postgres.c:2269

So this is the duration like in the screenshot:
duration: 13175.469

Does anyone know the reason why this is happening? The database migration (230GB attachments) was successful and the RT-validator did not indicate any errors.

Thanks in advance,
Ned