CQL fails to upload 300K+ instances with 504 timeout in UI
Description
Environment
None
Potential Workaround
None
Attachments
7
- 08 Jul 2024, 05:51 PM
- 08 Nov 2021, 03:08 PM
- 08 Nov 2021, 03:07 PM
- 08 Nov 2021, 03:02 PM
- 08 Nov 2021, 03:01 PM
- 08 Nov 2021, 03:00 PM
- 08 Nov 2021, 02:55 PM
Checklist
hideTestRail: Results
Activity
Show:
Magda Zacharska July 8, 2024 at 5:51 PMEdited
The issue has been resolved with architectural changes in Quesnelia release and works as expected:
Done
Details
Details
Assignee
Unassigned
UnassignedReporter
Varun Javalkar
Varun JavalkarPriority
Development Team
Firebird
TestRail: Cases
Open TestRail: Cases
TestRail: Runs
Open TestRail: Runs
Created November 8, 2021 at 2:55 PM
Updated July 8, 2024 at 5:51 PM
Resolved July 8, 2024 at 5:51 PM
TestRail: Cases
TestRail: Runs
Purpose/Overview:
Run data export job in https://pre-kiwi-cap1.int.aws.folio.org/ using source=MARC which returns 300K+ inventory instances
Requirements/Scope:
Data Export should upload 300K+ instances using CQL file
Approach:
In Inventory App in UI select source=MARC in Inventory App
Generate CQL file
Use CQL file to run Data Export
Observation:
When I try to upload cql file with cql query (source==“MARC”) sortby title, job fails with 504 after 10 minutes. Tried multiple times, see
I see timeout errors for upload API in nginx log
Database spikes when upload starts and fails
Postgresql query which takes 11+ minutes
2021-11-05 18:07:53 UTC:10.23.10.95(39082):fs09000000_mod_inventory_storage@folio:[7652]:LOG: duration: 714122.988 ms execute 0000000/0d93dffc-f6f5-46c1-a76b-5f85b814da4b: SELECT jsonb,id FROM fs09000000_mod_inventory_storage.instance WHERE CASE WHEN length(lower('MARC')) <= 600 THEN left(lower(instance.jsonb->>'source'),600) LIKE lower('MARC') ELSE left(lower(instance.jsonb->>'source'),600) LIKE left(lower('MARC'),600) AND lower(instance.jsonb->>'source') LIKE lower('MARC') END ORDER BY left(lower(f_unaccent(instance.jsonb->>'title')),600), lower(f_unaccent(instance.jsonb->>'title')) LIMIT 2147483647 OFFSET 0
See attached complete Postgresql log
Acceptance criteria:
Data Export should Upload a CQL file with cql query source=MARC which returns 300K+ instances
Migration scripts are provided (optional AC)