linagora / james-project

Mirror of Apache James Project
Apache License 2.0
70 stars 63 forks source link

Use -XX:OnOutOfMemoryError=kill -9 %p #5097

Closed chibenwa closed 5 months ago

chibenwa commented 6 months ago

-XX:OnOutOfMemoryError=kill -9 %p

A clean kill in case of OOM means K8S would restart the POD. The overall nightmare of OOM management, if ever happen again, would be a bit smoother.

This parameter is stallen from Apache Cassandra.

chibenwa commented 5 months ago

Simpler : -XX:+ExitOnOutOfMemoryError

chibenwa commented 5 months ago

https://ci.linagora.com/linagora/lrs/saas/tools/helm-charts/tmail-backend/-/merge_requests/41

Arsnael commented 5 months ago

FYI that value gets overrided in all our deployments using tmail-backend as sub-charts (so all of them) depending on what we need exactly, so need to add this flag in other deployment charts as well, or it will be missing.

Arsnael commented 5 months ago

Tenant-upn: https://ci.linagora.com/linagora/lrs/saas/deployments/tmail/emaily-staging-apps/-/merge_requests/35/diffs Sandbox: https://ci.linagora.com/linagora/lrs/saas/deployments/tmail/sandbox-emaily-apps/-/merge_requests/17 Postgres: https://ci.linagora.com/linagora/lrs/saas/deployments/tmail/postgresql-staging/-/merge_requests/4/diffs?commit_id=fcbb1dae43f24429a03973adaf50e37c311f45b4

I saw it already in cnb deployment chart so nothing to do on it.