Content
Resource usage peaks after migration to OpenProject Community 12
Added by Rafael Cardero over 1 year ago
Hi, we migrated from OpenProject Community 9 to OpenProject Community 12 recently. We also updated to Postgres 13 as required by the update procedure.
The system is working fine, but frequently we are having resource usage peaks that did not happen prior to the update. We inspected the logs and we found these suspicious lines,
worker_1 | W, [2023-03-02T20:03:04.651422 #92] WARN -- : user=3 Encountered slow SQL (4262.0537 ms): UPDATE "delayed_jobs" SET locked_at = '2023-03-02 20:02:59.996512', locked_by = 'host:6107e3a58c57 pid:92' WHERE id IN (SELECT "delayed_jobs"."id" FROM "delayed_jobs" WHERE (((run_at <= '2023-03-02 20:02:59.960607' AND (locked_at IS NULL OR locked_at < '2023-03-02 16:02:59.964765')) OR locked_by = 'host:6107e3a58c57 pid:92') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1 FOR UPDATE) RETURNING *
worker_1 | W, [2023-03-02T20:09:37.454183 #92] WARN -- : user=3 Encountered slow SQL (365205.6377 ms): UPDATE "delayed_jobs" SET locked_at = '2023-03-02 20:03:15.707348', locked_by = 'host:6107e3a58c57 pid:92' WHERE id IN (SELECT "delayed_jobs"."id" FROM "delayed_jobs" WHERE (((run_at <= '2023-03-02 20:03:11.605918' AND (locked_at IS NULL OR locked_at < '2023-03-02 16:03:11.637795')) OR locked_by = 'host:6107e3a58c57 pid:92') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1 FOR UPDATE) RETURNING *
What may be going wrong?
Details:
Installation type: Docker Compose.
Running on: Amazon t2.medium instance.
Best,
Rafael