Problem

The Dify Knowledge Base API processes one document per request.
Using the default Search API batch size (50) causes timeouts, partial indexing failures,
and hard-to-diagnose errors.

Proposed solution

  • Document in the README that the Dify backend sends one API call per document.
  • Recommend setting the Cron batch size to 1 in the index configuration.
  • Optionally, show an admin warning if batch size > 1 is detected.

Workaround

Set the batch size to 1 at

/admin/config/search/search-api/index/{index_id}/edit
Index options > Cron batch size.

Issue fork dify-3577479

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

asterovim created an issue. See original summary.

alban_g made their first commit to this issue’s fork.

asterovim’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

asterovim’s picture

Status: Fixed » Closed (fixed)

Thanks !

We didn't make the "Optionally, show an admin warning if batch size > 1 is detected." (too much code).