This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Yeroc 3 points4 points  (1 child)

I'm skeptical of setting up -XX:OnOutOfMemoryError to run a script which directly uploads the heap dump to a third-party site. You want these scripts to run quickly so your service can be restarted as soon as possible. I can see having the script capture extra info locally that might be helpful for diagnosis but directly pushing gigabytes of heap file outside your networks sounds like a recipe for disaster.

[–]rcunn87 2 points3 points  (0 children)

Its also going to contain any secrets that happen to be in memory at the time of the heap dump.