"Request timed out" in DB log with no additional info

Created on 28 May 2024, about 1 year ago

Problem/Motivation

Indexing a pretty big site with 6000+ nodes, I get "Request timed out" in the DB log after a while when indexing all elements, though it seems to finish the indexing step. I get the error at the end in the UI as well. I can't tell whether everything is really indexed.

However, there aren't any details as to *what* timed out.
Maybe file_extractor? Maybe the request to the Meilisearch server?

I don't find this string in the code, so I think it has to either be the guzzle framework, or probably meilisearch-php or search_api itself?

This makes debugging it pretty hard.
Does anyone have a clue where to dig deeper to find the actual issue?

Steps to reproduce

Index a large site with lots of PDFs and file_extractor probably used as well.

Proposed resolution

Whatever causes this, it would be very helpful to have a detailed error message in the log.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇦🇹Austria tgoeg

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @tgoeg
  • 🇸🇮Slovenia bcizej

    Probably the same issue as 🐛 Add timeout to waitForTask() Active . All index operations apart from searching are async in nature, ie. when requesting indexing of documents meilisearch immediately returns the response with task id that can be used to check on status of the operation. By default meilisearch-php library spends 5 seconds querying the status of the task and if the task has not completed by then it throws a timeout exception but it is possible that the task did not finish yet and is this in the process of indexing.

    In your case that seems to be the issue, specially since you said that the indexing completes successfully (on meilisearch side) but the Drupal Indexing UI shows an error.

    In the linked issue we increased this to 15s as we started noticing the same failures in tests (with very small datasets) but it is not a complete fix as operations could potentially take longer.

    The issue is that when you trigger indexation from Drupal you see a progress bar of indexing status - documents are indexed in batches and after each batch completes the progress bar moves. So we are waiting now for maximum of 5 seconds (15 seconds on the 3.x dev branch) for the indexing operation to complete the batch but as mentioned it could take longer. But we have to take into account the php max execution time here which can differ from server to server.

    Bottom line is we will have to investigate and figure out a solution on how to best handle the async operations in relation to how the search api module and UI works.

Production build 0.71.5 2024