Asset Indexes update causes server blocking and requires admin page to remain open #18231
Unanswered
nikolenko-dmitriy
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
I'm experiencing issues with Asset Indexes in Craft CMS 5 when working with approximately 15,000 assets.
Current Behavior:
When clicking the
Update asset indexesbutton for all volumes in the Control Panel (Utilities → Asset Indexes):index.php?p=actions/asset-indexes/process-indexing-session(several requests per second)runQueueAutomaticallyset tofalseThe Problem:
The asset indexing process runs as a frontend Ajax-based process instead of being queued as a background task in the Craft Queue system.
Workaround:
The console command
./craft index-assets/allworks perfectly for this use case because:memory_limit,max_execution_timerestrictions)Similarly, the queue system runs via cronjob, so it also has no resource limitations.
However, this workaround isn't viable for our case because:
Expected Behavior:
The "Update asset indexes" button in the Control Panel should queue the indexing operation as a background job in the Craft Queue system (similar to how other heavy operations work). This would:
Environment:
runQueueAutomatically=false(queue runs via cronjob)Question:
Is there a way to configure the Control Panel's "Update asset indexes" button to add jobs to the queue system instead of running as an Ajax-based frontend process?
Beta Was this translation helpful? Give feedback.
All reactions