The SharePoint Online component query can fail for some Lists or Libraries or folders when they have more than 5000 records such as documents, folders and so on. This is a known behavior of Microsoft SharePoint Online as Microsoft recommends to have the contents in an organized way such that records threshold limit should not exceed 5000.
To overcome the issue, you can try configuring the Index field and use that field as a filter criteria to keep the number of records below 5000.
When you create a filtered view, make sure the first indexed column in the Filter Expression does not exceed the List View threshold. SharePoint selects the first indexed column in a query. Other columns you specify in the view filter may or may not be indexed, but the view does not use those indexes, even if the result of the filtered view returns less than the List View threshold.
You can also move the records from a single Library to multiple Libraries and put the recorders in separate folders or sub folders.
|