[GH-ISSUE #3988] [FEAT]: Make defaultStaleAfter configurable for document sync frequency #2535

Closed
opened 2026-02-22 18:30:06 -05:00 by yindo · 2 comments
Owner

Originally created by @tgezginis on GitHub (Jun 12, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3988

Currently, the defaultStaleAfter value for auto document sync is hardcoded to 604800000 (7 days) in documentSyncQueue.js. While this works well for most cases, it would be extremely helpful if this value could be configured through an environment variable or workspace setting.

In some use cases (like syncing frequently changing operational documents), a daily sync (1 day) is much more suitable than 7 days. Having this as a configurable value would:
• Provide more flexibility for users with different document update frequencies
• Avoid modifying core source code for self-hosted deployments
• Support more real-time knowledge base scenarios

Would you consider making defaultStaleAfter configurable via .env, a global setting, or workspace-level override?

Thanks for the great work on this project.

Originally created by @tgezginis on GitHub (Jun 12, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3988 Currently, the defaultStaleAfter value for auto document sync is hardcoded to 604800000 (7 days) in [documentSyncQueue.js](https://github.com/Mintplex-Labs/anything-llm/blob/master/server/models/documentSyncQueue.js#L21). While this works well for most cases, it would be extremely helpful if this value could be configured through an environment variable or workspace setting. In some use cases (like syncing frequently changing operational documents), a daily sync (1 day) is much more suitable than 7 days. Having this as a configurable value would: • Provide more flexibility for users with different document update frequencies • Avoid modifying core source code for self-hosted deployments • Support more real-time knowledge base scenarios Would you consider making defaultStaleAfter configurable via .env, a global setting, or workspace-level override? Thanks for the great work on this project.
yindo added the enhancementfeature request labels 2026-02-22 18:30:06 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jun 12, 2025):

This is a good point, we still have the feature in experimental since we didnt want to accidentally overload people's embedders and such by resyncing documents too frequently (even if we do text diffing).

It should be configurable since 7 days is quite extreme

@timothycarambat commented on GitHub (Jun 12, 2025): This is a good point, we still have the feature in experimental since we didnt want to accidentally overload people's embedders and such by resyncing documents too frequently (even if we do text diffing). It should be configurable since 7 days is quite extreme
Author
Owner

@tgezginis commented on GitHub (Jun 12, 2025):

This is a good point, we still have the feature in experimental since we didnt want to accidentally overload people's embedders and such by resyncing documents too frequently (even if we do text diffing).

It should be configurable since 7 days is quite extreme

It could still default to 7 days, but it can be added as a setting or environment variable.

@tgezginis commented on GitHub (Jun 12, 2025): > This is a good point, we still have the feature in experimental since we didnt want to accidentally overload people's embedders and such by resyncing documents too frequently (even if we do text diffing). > > It should be configurable since 7 days is quite extreme It could still default to 7 days, but it can be added as a setting or environment variable.
yindo changed title from [FEAT]: Make defaultStaleAfter configurable for document sync frequency to [GH-ISSUE #3988] [FEAT]: Make defaultStaleAfter configurable for document sync frequency 2026-06-05 14:47:06 -04:00
yindo closed this issue 2026-06-05 14:47:07 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2535