netsec-ethz / fpki

4 stars 1 forks source link

Out-of-memory Exception during Certificate Ingestion #61

Open cyrill-k opened 3 months ago

cyrill-k commented 3 months ago

When ingesting a batch of ~40 million certificates from local csv files via the CertificateFolders config option introduced in https://github.com/netsec-ethz/fpki/tree/cyrill-mapserver-improvements, the mapserver runs out of memory during the SMT update phase (after adding the certificates and coalescing the payloads).

...
coalescing certificate payloads at 2024-03-21T19:31:52Z
updating SMT at 2024-03-21T19:55:49Z
cyrill-k commented 3 months ago

This bug can be reproduced as follows:

cyrill-k commented 3 months ago

When adjusting the batch size to 100000, the SMT can be updated without any issues.

However, when using a batch size of 1000000, the following error message appears:

We may be able to solve this problem by:

juagargi commented 2 months ago

Although it could have happened before this step, when the ingest tool runs the SMT update, we run out of memory in mysqld. See attached screenshot.

image

We probably need to: