Skip to content

Commit 4fa660c

Browse files
Limits the upload size of lists to 9 meg size (#72898)
## Summary Limits the lists to 9 megs upload size so we don't blow up smaller Kibana installs. Users can change/override this using the switch of `xpack.lists.maxImportPayloadBytes` like so: ``` xpack.lists.maxImportPayloadBytes: 40000000 ``` That will increase the amount of bytes that can pushed through REST endpoints from 9 megs to something like 40 megs if the end users want to increase the size of their lists and have enough memory in Kibana. Metrics and suggestions from testing looks like: ```ts Kibana with 1 gig of memory can upload ~10 megs of a list before possible out of memory issue Kibana with 2 gig of memory can upload ~20 megs of a list before possible out of memory issue ``` Things can vary depending on the speed of the uploads of the lists where faster connections to Kibana but slower connections from Kibana to Elastic Search can influence the numbers. ### Checklist - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
1 parent ffd8ed2 commit 4fa660c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

x-pack/plugins/lists/common/constants.mock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const OPERATOR = 'included';
4141
export const ENTRY_VALUE = 'some host name';
4242
export const MATCH = 'match';
4343
export const MATCH_ANY = 'match_any';
44-
export const MAX_IMPORT_PAYLOAD_BYTES = 40000000;
44+
export const MAX_IMPORT_PAYLOAD_BYTES = 9000000;
4545
export const IMPORT_BUFFER_SIZE = 1000;
4646
export const LIST = 'list';
4747
export const EXISTS = 'exists';

x-pack/plugins/lists/server/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const ConfigSchema = schema.object({
1111
importBufferSize: schema.number({ defaultValue: 1000, min: 1 }),
1212
listIndex: schema.string({ defaultValue: '.lists' }),
1313
listItemIndex: schema.string({ defaultValue: '.items' }),
14-
maxImportPayloadBytes: schema.number({ defaultValue: 40000000, min: 1 }),
14+
maxImportPayloadBytes: schema.number({ defaultValue: 9000000, min: 1 }),
1515
});
1616

1717
export type ConfigType = TypeOf<typeof ConfigSchema>;

0 commit comments

Comments
 (0)