-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Description
We have recently encountered an issue where Kibana crashes when installing a Fleet package that contains a large number of saved objects. The crash occurs during the installation process and seems to be caused by the deletion of the previous package version.
Steps to reproduce:
- Install a Fleet package that contains a large number of saved objects (e.g. over 10,000) using
POST /api/fleet/epm/packages/<package>/<version>.
You could follow the steps from this ticket to generate a package with a large number of saved objects and install it. - Observe that Kibana crashes during the installation process.
Expected result:
The Fleet package should be installed successfully without crashing Kibana.
Actual result:
Kibana crashes during the installation process. Elasticsearch logs show dozens of warnings similar to this:
block until refresh ran out of slots and forced a refresh: [BulkShardRequest [[.kibana_8.7.0_001][0]] containing [delete {[.kibana_8.7.0][security-rule:d8fc1cca-93ed-43c1-bbb6-c0dd3eff2958:102.0.6]}] blocking until refresh]
During that time, all requests to Kibana fail with
{"statusCode":503,"error":"Service Unavailable","message":"connect EADDRNOTAVAIL 127.0.0.1:9200 - Local (0.0.0.0:0)"}Notes:
This issue does not occur with smaller packages containing fewer saved objects.
The issue can be temporarily resolved by manually deleting the saved objects from the previous package version before installing the new one, but this is not a permanent solution.
APM logs show hundreds of DELETE requests sent in parallel, they seem to overflow Elasticsearch, making it unresponsive:
