Reclaim space problem

Problem:
I am getting that error by reclaim space:
“sending query and params failed: number of parameters must be between 0 and 65535”
What do i need to change?

Expected outcome:

Foreman and Proxy versions:
foreman-3.12.0-1.el8.noarch
katello-4.14.0-1.el8.noarch
Foreman and Proxy plugin versions:

Distribution and version:
RHEL 8.10
Other relevant data:

Actions::Pulp3::CapsuleContent::ReclaimSpace
Input:
{"services_checked"=>["pulp3"],
 "smart_proxy"=>{"id"=>1, "name"=>"foreman.com"},
 "repository_hrefs"=>
  ["/pulp/api/v3/repositories/deb/apt/018fb9d5-78cc-717b-b6b6-4f360e02c2ef/",
   "/pulp/api/v3/repositories/rpm/rpm/8f507ee5-e9ba-4518-ae06-deb3f2161891/",
   "/pulp/api/v3/repositories/rpm/rpm/f2e5323d-9536-4c08-b252-3c3d504bf111/",
   "/pulp/api/v3/repositories/rpm/rpm/018bd2bb-f432-7107-8641-04e1baaabb53/",
   "/pulp/api/v3/repositories/rpm/rpm/018bd2be-491b-703f-a119-49bd216faad0/",
   "/pulp/api/v3/repositories/rpm/rpm/018fe2cf-f86d-7759-bd7d-e5b04910f761/",
   "/pulp/api/v3/repositories/rpm/rpm/018fe2d1-50b1-76cb-99a2-2cdff052845b/",
   "/pulp/api/v3/repositories/rpm/rpm/2a16d807-2109-4675-ac50-174b26522b5c/",
   "/pulp/api/v3/repositories/rpm/rpm/a02e25c6-1630-4467-90b1-7de23210c966/",
   "/pulp/api/v3/repositories/rpm/rpm/018fe2d3-1958-7a7e-ad86-07e31c422787/",
   "/pulp/api/v3/repositories/rpm/rpm/018fe2d3-7955-7aff-b8ce-c165d061398d/",
   "/pulp/api/v3/repositories/rpm/rpm/c20f4d07-2aad-4541-985f-6275e6ec9d81/",
   "/pulp/api/v3/repositories/rpm/rpm/2cc27369-9cd5-408e-9868-80e82e8429ab/",
   "/pulp/api/v3/repositories/rpm/rpm/018fe2d0-17cd-71f8-a2b4-925f708c4ba5/",
   "/pulp/api/v3/repositories/rpm/rpm/770eddbc-f2df-4ff3-8ec6-f393c86abfed/",
   "/pulp/api/v3/repositories/rpm/rpm/018fe2d0-7f84-7799-8efd-a77e1af69ec7/",
   "/pulp/api/v3/repositories/rpm/rpm/8a2109ac-5ef8-4751-bb5b-66946f27f794/",
   "/pulp/api/v3/repositories/rpm/rpm/018fe2d0-c6d0-7cfd-b046-d826bd463999/",
   "/pulp/api/v3/repositories/rpm/rpm/018bd2be-eab8-7707-8fe4-6d0a4fa15454/",
   "/pulp/api/v3/repositories/rpm/rpm/018d17a4-63a3-7dff-9e4c-ff04b9df95a1/",
   "/pulp/api/v3/repositories/rpm/rpm/018d1c4b-1a09-7958-8135-54141a4c6730/",
   "/pulp/api/v3/repositories/rpm/rpm/018d1c4f-ae01-7c3e-9856-b28366af02f5/",
   "/pulp/api/v3/repositories/rpm/rpm/018d1c51-0d96-7871-8aec-30175dd618c3/",
   "/pulp/api/v3/repositories/rpm/rpm/018d1c56-169d-7e92-b0d5-8cab05ee77d2/",
   "/pulp/api/v3/repositories/rpm/rpm/018d1c57-7651-7060-9d9c-21f5fc439972/",
   "/pulp/api/v3/repositories/rpm/rpm/018d1c58-d693-71d5-abd6-1cec9d1661a7/",
   "/pulp/api/v3/repositories/rpm/rpm/018fe2d2-4923-7dfa-85b0-082ed5451173/",
   "/pulp/api/v3/repositories/rpm/rpm/018fe2d2-85bf-7e7a-a615-d248450ad42a/",
   "/pulp/api/v3/repositories/rpm/rpm/018fe2d2-ef48-73f6-9176-6fd0837a1220/",
   "/pulp/api/v3/repositories/rpm/rpm/018bd2bf-5b1b-7e6f-a8bf-a6fd518a955b/",
   "/pulp/api/v3/repositories/rpm/rpm/018bd2bf-d083-7951-ad9a-0d17b8b77a64/",
   "/pulp/api/v3/repositories/rpm/rpm/77fc30ec-bb92-4a8f-b6af-7c87190ad5f2/",
   "/pulp/api/v3/repositories/rpm/rpm/ebbeecd2-107c-4510-9900-f20d7d111a2e/",
   "/pulp/api/v3/repositories/rpm/rpm/fc893376-7307-44a0-907b-fa5c6aea3848/",
   "/pulp/api/v3/repositories/rpm/rpm/66f11a42-1853-4089-9caa-0b067b4e5ee2/",
   "/pulp/api/v3/repositories/rpm/rpm/23ae6e4d-d426-434d-9b63-9a92aa190865/",
   "/pulp/api/v3/repositories/rpm/rpm/572a753a-0c7a-48a1-939c-d17541c61f4a/",
   "/pulp/api/v3/repositories/rpm/rpm/7cb3a042-fa5a-4290-8161-6ac82da55dba/",
   "/pulp/api/v3/repositories/rpm/rpm/d5ed274c-ef67-40c7-a98b-58f91b11e541/",
   "/pulp/api/v3/repositories/rpm/rpm/f9bd0cd3-3089-436e-a52f-2cc46a7976a5/",
   "/pulp/api/v3/repositories/rpm/rpm/018c6d48-ec9c-797c-82e3-100d95f03a12/",
   "/pulp/api/v3/repositories/rpm/rpm/d889d984-d866-4d80-aca6-7da2ba5c8256/",
   "/pulp/api/v3/repositories/rpm/rpm/4a1a5e3a-a62d-465c-a0a5-b91aee9fa6c7/",
   "/pulp/api/v3/repositories/rpm/rpm/72939e0a-1de3-4cf1-a07b-b15aeeb17d0a/",
   "/pulp/api/v3/repositories/rpm/rpm/0bf7f91c-efab-443e-af7a-62f471e7c901/",
   "/pulp/api/v3/repositories/rpm/rpm/20bb7b11-07a4-4db5-89bc-1d9bd6de0bcb/",
   "/pulp/api/v3/repositories/rpm/rpm/cd6036d6-19ac-43ea-b664-8e082796a05a/",
   "/pulp/api/v3/repositories/rpm/rpm/f2d4f43c-30b7-4733-8f2a-bffbbf123934/",
   "/pulp/api/v3/repositories/rpm/rpm/2ca5224f-c213-4bb3-85b9-380f8d5a38c5/",
   "/pulp/api/v3/repositories/rpm/rpm/44b9279c-853d-44cb-bc04-bcf214d7d745/",
   "/pulp/api/v3/repositories/rpm/rpm/f3dfd7f7-2a5b-4089-a487-c919e41deb00/",
   "/pulp/api/v3/repositories/rpm/rpm/0c201731-f7c2-44e7-87b0-638a5e156306/",
   "/pulp/api/v3/repositories/rpm/rpm/1650a7e2-ad3f-4974-9eaf-1940c6dcac85/",
   "/pulp/api/v3/repositories/rpm/rpm/1f7f6d44-f3e8-438e-9581-1c7c6b7d234a/",
   "/pulp/api/v3/repositories/rpm/rpm/71446d6a-df6b-4807-8586-68feac095f51/",
   "/pulp/api/v3/repositories/rpm/rpm/6acbe6fe-bc86-4976-bf5b-e6746948d440/",
   "/pulp/api/v3/repositories/rpm/rpm/f3bbdcdd-5ad4-4f84-b7d7-4b5630d49727/",
   "/pulp/api/v3/repositories/rpm/rpm/4f9b079a-cd69-450d-b958-bc04eb8de3cb/",
   "/pulp/api/v3/repositories/rpm/rpm/d510f25f-30bb-42b3-a07d-dcd6d4149b77/",
   "/pulp/api/v3/repositories/rpm/rpm/7c8bfc2b-4ffa-40f0-9099-bfef9a24ed89/",
   "/pulp/api/v3/repositories/rpm/rpm/cb7e2c36-cc89-4d7a-bc71-89cdb5000c25/",
   "/pulp/api/v3/repositories/rpm/rpm/97b2c413-a3a1-4451-8501-b88dc5117b01/",
   "/pulp/api/v3/repositories/rpm/rpm/bed0a703-48f4-4748-a3c1-87cfa4b48c9e/",
   "/pulp/api/v3/repositories/rpm/rpm/fe02a387-b3dd-4c84-9c68-6e9e7c0759cd/",
   "/pulp/api/v3/repositories/rpm/rpm/e0277eee-e9e2-4f35-b6d4-ba2227c1696c/",
   "/pulp/api/v3/repositories/rpm/rpm/cf916f65-afa8-44a7-883a-393b16c3e6c1/",
   "/pulp/api/v3/repositories/rpm/rpm/ed25dec6-17e8-4ed7-ab0b-ee6c92f42c34/",
   "/pulp/api/v3/repositories/rpm/rpm/addecc7a-a802-478a-8571-87669d70d4d0/",
   "/pulp/api/v3/repositories/rpm/rpm/5b1c58c2-7801-44d9-a7e2-0052908d4cfc/",
   "/pulp/api/v3/repositories/rpm/rpm/2059c863-8894-4437-b844-aa8f51f26365/",
   "/pulp/api/v3/repositories/rpm/rpm/aa5fef31-f5ec-4b85-9cc0-632156ac7bef/",
   "/pulp/api/v3/repositories/rpm/rpm/79f65776-4a35-45b8-a4d1-26d400ac5cdb/"],
 "smart_proxy_id"=>1,
 "remote_user"=>"administrator",
 "remote_cp_user"=>"administrator",
 "current_request_id"=>"7206d24c-b492-4709-9232-77a3f0d86a9d",
 "current_timezone"=>"Europe/Vienna",
 "current_organization_id"=>5,
 "current_location_id"=>nil,
 "current_user_id"=>71}
Output:
{"pulp_tasks"=>
  [{"pulp_href"=>"/pulp/api/v3/tasks/01938c49-6a15-7dde-ba9b-76e269f58f04/",
    "pulp_created"=>"2024-12-03T11:30:41.814+00:00",
    "pulp_last_updated"=>"2024-12-03T11:30:41.814+00:00",
    "state"=>"failed",
    "name"=>"pulpcore.app.tasks.reclaim_space.reclaim_space",
    "logging_cid"=>"7206d24c-b492-4709-9232-77a3f0d86a9d",
    "created_by"=>"/pulp/api/v3/users/1/",
    "unblocked_at"=>"2024-12-03T11:30:42.012+00:00",
    "started_at"=>"2024-12-03T11:30:42.075+00:00",
    "finished_at"=>"2024-12-04T13:59:25.705+00:00",
    "error"=>
     {"traceback"=>
       "  File \"/usr/lib/python3.11/site-packages/pulpcore/tasking/tasks.py\", line 66, in _execute_task\n" +
       "    result = func(*args, **kwargs)\n" +
       "             ^^^^^^^^^^^^^^^^^^^^^\n" +
       "  File \"/usr/lib/python3.11/site-packages/pulpcore/app/tasks/reclaim_space.py\", line 84, in reclaim_space\n" +
       "    for artifact in artifacts_to_delete.iterator():\n" +
       "  File \"/usr/lib/python3.11/site-packages/django/db/models/query.py\", line 516, in _iterator\n" +
       "    yield from iterable\n" +
       "  File \"/usr/lib/python3.11/site-packages/django/db/models/query.py\", line 91, in __iter__\n" +
       "    results = compiler.execute_sql(\n" +
       "              ^^^^^^^^^^^^^^^^^^^^^\n" +
       "  File \"/usr/lib/python3.11/site-packages/django/db/models/sql/compiler.py\", line 1562, in execute_sql\n" +
       "    cursor.execute(sql, params)\n" +
       "  File \"/usr/lib/python3.11/site-packages/django/db/backends/utils.py\", line 67, in execute\n" +
       "    return self._execute_with_wrappers(\n" +
       "           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
       "  File \"/usr/lib/python3.11/site-packages/django/db/backends/utils.py\", line 80, in _execute_with_wrappers\n" +
       "    return executor(sql, params, many, context)\n" +
       "           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
       "  File \"/usr/lib/python3.11/site-packages/django/db/backends/utils.py\", line 84, in _execute\n" +
       "    with self.db.wrap_database_errors:\n" +
       "  File \"/usr/lib/python3.11/site-packages/django/db/utils.py\", line 91, in __exit__\n" +
       "    raise dj_exc_value.with_traceback(traceback) from exc_value\n" +
       "  File \"/usr/lib/python3.11/site-packages/django/db/backends/utils.py\", line 89, in _execute\n" +
       "    return self.cursor.execute(sql, params)\n" +
       "           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
       "  File \"/usr/lib/python3.11/site-packages/psycopg/server_cursor.py\", line 294, in execute\n" +
       "    raise ex.with_traceback(None)\n",
      "description"=>
       "sending query and params failed: number of parameters must be between 0 and 65535"},
    "worker"=>"/pulp/api/v3/workers/01938c42-62bf-75ef-90a6-c279ac32d216/",
    "child_tasks"=>[],
    "progress_reports"=>
     [{"message"=>"Reclaim disk space",
       "code"=>"reclaim-space.artifact",
       "state"=>"running",
       "total"=>212709,
       "done"=>0}],
    "created_resources"=>[],
    "reserved_resources_record"=>
     ["shared:/pulp/api/v3/repositories/rpm/rpm/770eddbc-f2df-4ff3-8ec6-f393c86abfed/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/bed0a703-48f4-4748-a3c1-87cfa4b48c9e/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/1f7f6d44-f3e8-438e-9581-1c7c6b7d234a/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/c20f4d07-2aad-4541-985f-6275e6ec9d81/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/d889d984-d866-4d80-aca6-7da2ba5c8256/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018fe2d3-7955-7aff-b8ce-c165d061398d/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018fe2d3-1958-7a7e-ad86-07e31c422787/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/cd6036d6-19ac-43ea-b664-8e082796a05a/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018fe2d0-7f84-7799-8efd-a77e1af69ec7/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/20bb7b11-07a4-4db5-89bc-1d9bd6de0bcb/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/0c201731-f7c2-44e7-87b0-638a5e156306/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018c6d48-ec9c-797c-82e3-100d95f03a12/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/ebbeecd2-107c-4510-9900-f20d7d111a2e/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/71446d6a-df6b-4807-8586-68feac095f51/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/d510f25f-30bb-42b3-a07d-dcd6d4149b77/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/7cb3a042-fa5a-4290-8161-6ac82da55dba/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/ed25dec6-17e8-4ed7-ab0b-ee6c92f42c34/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/cb7e2c36-cc89-4d7a-bc71-89cdb5000c25/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/8a2109ac-5ef8-4751-bb5b-66946f27f794/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/72939e0a-1de3-4cf1-a07b-b15aeeb17d0a/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/97b2c413-a3a1-4451-8501-b88dc5117b01/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/fe02a387-b3dd-4c84-9c68-6e9e7c0759cd/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/f3dfd7f7-2a5b-4089-a487-c919e41deb00/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018d1c56-169d-7e92-b0d5-8cab05ee77d2/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018bd2be-eab8-7707-8fe4-6d0a4fa15454/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018fe2d2-ef48-73f6-9176-6fd0837a1220/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/2ca5224f-c213-4bb3-85b9-380f8d5a38c5/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/e0277eee-e9e2-4f35-b6d4-ba2227c1696c/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/77fc30ec-bb92-4a8f-b6af-7c87190ad5f2/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/4f9b079a-cd69-450d-b958-bc04eb8de3cb/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/cf916f65-afa8-44a7-883a-393b16c3e6c1/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/d5ed274c-ef67-40c7-a98b-58f91b11e541/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/8f507ee5-e9ba-4518-ae06-deb3f2161891/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/a02e25c6-1630-4467-90b1-7de23210c966/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018d1c4b-1a09-7958-8135-54141a4c6730/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/23ae6e4d-d426-434d-9b63-9a92aa190865/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/2cc27369-9cd5-408e-9868-80e82e8429ab/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/7c8bfc2b-4ffa-40f0-9099-bfef9a24ed89/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018fe2d2-4923-7dfa-85b0-082ed5451173/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/f3bbdcdd-5ad4-4f84-b7d7-4b5630d49727/",
      "shared:/pulp/api/v3/repositories/deb/apt/018fb9d5-78cc-717b-b6b6-4f360e02c2ef/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018fe2d2-85bf-7e7a-a615-d248450ad42a/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018d1c57-7651-7060-9d9c-21f5fc439972/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/fc893376-7307-44a0-907b-fa5c6aea3848/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/572a753a-0c7a-48a1-939c-d17541c61f4a/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018d17a4-63a3-7dff-9e4c-ff04b9df95a1/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018fe2cf-f86d-7759-bd7d-e5b04910f761/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/5b1c58c2-7801-44d9-a7e2-0052908d4cfc/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018fe2d1-50b1-76cb-99a2-2cdff052845b/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018bd2bf-d083-7951-ad9a-0d17b8b77a64/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/0bf7f91c-efab-443e-af7a-62f471e7c901/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018d1c51-0d96-7871-8aec-30175dd618c3/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018bd2be-491b-703f-a119-49bd216faad0/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/2a16d807-2109-4675-ac50-174b26522b5c/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018fe2d0-17cd-71f8-a2b4-925f708c4ba5/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018d1c4f-ae01-7c3e-9856-b28366af02f5/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/66f11a42-1853-4089-9caa-0b067b4e5ee2/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/6acbe6fe-bc86-4976-bf5b-e6746948d440/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/2059c863-8894-4437-b844-aa8f51f26365/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/addecc7a-a802-478a-8571-87669d70d4d0/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/f2d4f43c-30b7-4733-8f2a-bffbbf123934/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/79f65776-4a35-45b8-a4d1-26d400ac5cdb/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018fe2d0-c6d0-7cfd-b046-d826bd463999/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/1650a7e2-ad3f-4974-9eaf-1940c6dcac85/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018bd2bf-5b1b-7e6f-a8bf-a6fd518a955b/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/f9bd0cd3-3089-436e-a52f-2cc46a7976a5/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/aa5fef31-f5ec-4b85-9cc0-632156ac7bef/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/4a1a5e3a-a62d-465c-a0a5-b91aee9fa6c7/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/f2e5323d-9536-4c08-b252-3c3d504bf111/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018d1c58-d693-71d5-abd6-1cec9d1661a7/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/44b9279c-853d-44cb-bc04-bcf214d7d745/",
      "shared:/pulp/api/v3/repositories/rpm/rpm/018bd2bb-f432-7107-8641-04e1baaabb53/",
      "shared:/pulp/api/v3/domains/018b65bd-5831-7786-92e0-c59712974436/"]}],
 "task_groups"=>[],
 "poll_attempts"=>{"total"=>5902, "failed"=>1}}
Exception:
Katello::Errors::Pulp3Error: sending query and params failed: number of parameters must be between 0 and 65535
Backtrace:
/usr/share/gems/gems/katello-4.14.0/app/lib/actions/pulp3/abstract_async_task.rb:107:in `block in check_for_errors'
/usr/share/gems/gems/katello-4.14.0/app/lib/actions/pulp3/abstract_async_task.rb:105:in `each'
/usr/share/gems/gems/katello-4.14.0/app/lib/actions/pulp3/abstract_async_task.rb:105:in `check_for_errors'
/usr/share/gems/gems/katello-4.14.0/app/lib/actions/pulp3/abstract_async_task.rb:161:in `poll_external_task'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/action/polling.rb:100:in `poll_external_task_with_rescue'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/action/polling.rb:22:in `run'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/action/cancellable.rb:15:in `run'
/usr/share/gems/gems/katello-4.14.0/app/lib/actions/pulp3/abstract_async_task.rb:10:in `run'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/action.rb:590:in `block (3 levels) in execute_run'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:28:in `pass'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware.rb:20:in `pass'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware.rb:33:in `run'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:24:in `call'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:28:in `pass'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware.rb:20:in `pass'
/usr/share/gems/gems/katello-4.14.0/app/lib/actions/middleware/remote_action.rb:16:in `block in run'
/usr/share/gems/gems/katello-4.14.0/app/lib/actions/middleware/remote_action.rb:40:in `block in as_remote_user'
/usr/share/gems/gems/katello-4.14.0/app/models/katello/concerns/user_extensions.rb:21:in `cp_config'
/usr/share/gems/gems/katello-4.14.0/app/lib/actions/middleware/remote_action.rb:27:in `as_cp_user'
/usr/share/gems/gems/katello-4.14.0/app/lib/actions/middleware/remote_action.rb:39:in `as_remote_user'
/usr/share/gems/gems/katello-4.14.0/app/lib/actions/middleware/remote_action.rb:16:in `run'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:24:in `call'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:28:in `pass'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware.rb:20:in `pass'
/usr/share/gems/gems/foreman-tasks-9.2.3/app/lib/actions/middleware/rails_executor_wrap.rb:14:in `block in run'
/usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/execution_wrapper.rb:91:in `wrap'
/usr/share/gems/gems/foreman-tasks-9.2.3/app/lib/actions/middleware/rails_executor_wrap.rb:13:in `run'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:24:in `call'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:28:in `pass'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware.rb:20:in `pass'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/action/progress.rb:29:in `with_progress_calculation'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/action/progress.rb:15:in `run'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:24:in `call'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:28:in `pass'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware.rb:20:in `pass'
/usr/share/gems/gems/foreman-tasks-9.2.3/app/lib/actions/middleware/load_setting_values.rb:20:in `run'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:24:in `call'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:28:in `pass'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware.rb:20:in `pass'
/usr/share/gems/gems/foreman-tasks-9.2.3/app/lib/actions/middleware/keep_current_request_id.rb:15:in `block in run'
/usr/share/gems/gems/foreman-tasks-9.2.3/app/lib/actions/middleware/keep_current_request_id.rb:52:in `restore_current_request_id'
/usr/share/gems/gems/foreman-tasks-9.2.3/app/lib/actions/middleware/keep_current_request_id.rb:15:in `run'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:24:in `call'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:28:in `pass'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware.rb:20:in `pass'
/usr/share/gems/gems/foreman-tasks-9.2.3/app/lib/actions/middleware/keep_current_timezone.rb:15:in `block in run'
/usr/share/gems/gems/foreman-tasks-9.2.3/app/lib/actions/middleware/keep_current_timezone.rb:44:in `restore_curent_timezone'
/usr/share/gems/gems/foreman-tasks-9.2.3/app/lib/actions/middleware/keep_current_timezone.rb:15:in `run'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:24:in `call'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:28:in `pass'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware.rb:20:in `pass'
/usr/share/gems/gems/foreman-tasks-9.2.3/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in `block in run'
/usr/share/gems/gems/foreman-tasks-9.2.3/app/lib/actions/middleware/keep_current_taxonomies.rb:45:in `restore_current_taxonomies'
/usr/share/gems/gems/foreman-tasks-9.2.3/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in `run'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:24:in `call'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:28:in `pass'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware.rb:20:in `pass'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware.rb:33:in `run'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:24:in `call'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:28:in `pass'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware.rb:20:in `pass'
/usr/share/gems/gems/foreman-tasks-9.2.3/app/lib/actions/middleware/keep_current_user.rb:15:in `block in run'
/usr/share/gems/gems/foreman-tasks-9.2.3/app/lib/actions/middleware/keep_current_user.rb:54:in `restore_curent_user'
/usr/share/gems/gems/foreman-tasks-9.2.3/app/lib/actions/middleware/keep_current_user.rb:15:in `run'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/stack.rb:24:in `call'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/middleware/world.rb:31:in `execute'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/action.rb:589:in `block (2 levels) in execute_run'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/action.rb:588:in `catch'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/action.rb:588:in `block in execute_run'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/action.rb:491:in `block in with_error_handling'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/action.rb:491:in `catch'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/action.rb:491:in `with_error_handling'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/action.rb:583:in `execute_run'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/action.rb:304:in `execute'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:18:in `block (2 levels) in execute'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/execution_plan/steps/abstract.rb:168:in `with_meta_calculation'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:17:in `block in execute'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:32:in `open_action'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:16:in `execute'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/director.rb:95:in `execute'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/executors/sidekiq/worker_jobs.rb:12:in `block (2 levels) in perform'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/executors.rb:18:in `run_user_code'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/executors/sidekiq/worker_jobs.rb:10:in `block in perform'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/executors/sidekiq/worker_jobs.rb:26:in `with_telemetry'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/executors/sidekiq/worker_jobs.rb:9:in `perform'
/usr/share/gems/gems/dynflow-1.9.0/lib/dynflow/executors/sidekiq/serialization.rb:28:in `perform'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:202:in `execute_job'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:170:in `block (2 levels) in process'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/middleware/chain.rb:172:in `invoke'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:169:in `block in process'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/job_retry.rb:113:in `local'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq.rb:44:in `block in <module:Sidekiq>'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:263:in `stats'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/job_logger.rb:13:in `call'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/job_retry.rb:80:in `global'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:124:in `block in dispatch'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/job_logger.rb:39:in `prepare'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:123:in `dispatch'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:168:in `process'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:78:in `process_one'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:68:in `run'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/component.rb:8:in `watchdog'
/usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/component.rb:17:in `block in safe_thread'
/usr/share/gems/gems/logging-2.4.0/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'```


<!-- Managed client information, logs from Foreman and/or the Proxy, modified templates, commands issued, etc. For logs and configuration files, please use "preformatted text" from the toolbar to ensure proper formatting. -->

Hi @senetm

This was fixed in Pulpcore 3.57:

Implement batching for artifact deletion to handle large repositories by hstct · Pull Request #5636 · pulp/pulpcore

We ship 3.63 with Katello 4.15 that just went GA. Are you able to upgrade and see if the problem persists?