gdcc / dataverse-kubernetes

Simple to use Dataverse container images and Kubernetes objects

Home Page:http://k8s-docs.gdcc.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make heap dumps available via sidecar

poikilotherm opened this issue · comments

Currently, when the appserver gets killed because of an OOM event, there is no good way to debug what went wrong.

This is bad for production as well as development. Instead of standing naked, we should be able to analyse heap dumps.

  • Make the images contain a path /dumps
  • Enable dumping with -XX:+HeapDumpOnOutOfMemoryError
  • Write to a common path with -XX:HeapDumpPath=/dumps
  • Mount emptyDir to /dumps
  • Add sidecar, also mounting /dumps (makes dumps available that are generated when the container does not start)
  • Document how to get that file for analysis (kubectl cp, upload)
  • This example sidecar should be optional and/or reside in the dev persona, so it can be replaced by a custom handler fitting the real world production.

The sidecar can be extended in a lot of ways, like notifications, uploading to object stores, ...

Some examples can be found on the web: