[3.x]: Issue with server when updating search indexes
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
What happened?
Description
Upon saving entries in the CMS admin panel a queue of jobs started racking up as normal, there were quite a few search index jobs coming in and they piled up but they were being executed by the looks of it but then it stopped when it hit about 4 updating search indexes jobs in the queue and then the server dropped off and php-fpm stopped working.
Upon looking in the logs this is what happened:
WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 5 idle, and 10 total children
Steps to reproduce
- Open an entry
- Make some edits
- save the entry
- Watch Queue'd jobs start
Expected behavior
The jobs should all clear one by one and not get stuck and break php-fpm.
Actual behavior
When the jobs rack up the server drops out and crashes.
Craft CMS version
Craft CMS 3.7.37
PHP version
7.3.27
Operating system and version
Linux 4.15.0-22-generic
Database type and version
No response
Image driver and version
MySQL 5.7.33
Installed plugins and versions
Amazon S3 - 1.3.0
Asset Rev -6.0.2
AsyncQueue - 2.3.0
Blitz - 3.11.1
Breadcrumb1.1.0
Bugsnag - 2.1.
Commerce Variant Cloner - 1.0.0
Contact Form- 2.3.0
Craft Commerce - 3.4.13
Craft Variants - 1.0.1
Eager Beaver - 1.0.4
Field Manager - 2.2.4
Imgix - 2.1.0
Instant Analytics - 1.1.15
Many to Many Field Type - 1.0.2.2
MobileDetect - 1.0.2
Patrol - 3.1.3
Postman - 1.0
Postmark - 2.1.0
Redactor - 2.10.5
Retour - 3.1.70
Scout - 2.6.1
SEOmatic - 3.4.28
Snaptcha - 3.0.11
Stripe for Craft Commerce - 2.4.3
Twig Perversion - 2.2.0
Webperf - 1.0.27
Wordsmith - 3.3.0.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue from the CMS admin entry-save flow and observe the queued “updating search indexes” jobs alongside the PHP-FPM logs. Trace the queue and search-indexing entry points involved; done means repeated saves process all jobs without the queue stalling or PHP-FPM becoming unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, performance, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100