Prometheus pod OOM killed

405 views
Skip to first unread message

hamisa

unread,
Feb 2, 2021, 8:32:55 AM2/2/21
to Prometheus Users
Hi there, 
I'm running prometheus 2.17 on my openshift 3.9.43 cluster. 
when the prometheus pod collapse (deleted, evicted ...) the newly created pod start reading the wal segments in addiotion to run prometheus again. 
in that process the prometheus' pod container get into OOM state, and recreated just afterwards which causes CrashLoopBack to the pod. 

is there any solution to this problem? 

thanks in advance.

Ben Kochie

unread,
Feb 2, 2021, 9:25:06 AM2/2/21
to hamisa, Prometheus Users
You will need to give the instance more memory in order to complete the recovery.

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/b967175e-9658-4d6e-ac27-bb62a5a2f70bn%40googlegroups.com.

hamisa

unread,
Feb 2, 2021, 9:44:16 AM2/2/21
to Prometheus Users
thanks for the quick reply. 

is there any way for me to disable it, or at least reduce the amount of memory it consumes? 
or for a change reduce the data capacity that being loaded from the wal? 

thanks in advance.

Ben Kochie

unread,
Feb 2, 2021, 11:09:07 AM2/2/21
to hamisa, Prometheus Users
There have been some small improvements to the WAL, reducing the amount needed for startup. But you will have to upgrade to the latest release. This will not help the current situation you have, as the improvements come after upgrade.

Either way, there is almost never any choice about allocating more memory when you're hitting an OOM. Prometheus always uses the minimum amount of memory it can for operating. If it needs more memory, you need to decrease your metric cardinality or increase the allocated memory. There's no magic fix.

hamisa

unread,
Feb 2, 2021, 12:13:50 PM2/2/21
to Prometheus Users
Thanks for the quick & detailed response ! 
Reply all
Reply to author
Forward
0 new messages