{{ message }}
Implement auto dump on out-of-memory#123
Open
tortis wants to merge 2 commits into
Open
Conversation
Two new INI settings have been added called `meminfo.dump_on_limit` and `meminfo.dump_dir`. When dump_on_limit is enabled, meminfo will attempt to create a heap dump when an OOM error is detected in the `dump_dir` directory. OOM errors are detected by registering an error handler, then checking for a prefix of "Allowed memory size of" on the error message.
Author
BitOne
approved these changes
Mar 29, 2022
BitOne
left a comment
Owner
There was a problem hiding this comment.
Can you check the indentation to make it homogeneous with the rest of the code?
Otherwise, pretty cool, stuff thank you!
| return s3; | ||
| } | ||
|
|
||
| #define MEMORY_LIMIT_ERROR_PREFIX "Allowed memory size of" |
Owner
There was a problem hiding this comment.
Is there no other way to check for memory exhaustion error?
Author
There was a problem hiding this comment.
I found this technique in memprof when I was researching how to do it. Unfortunately I didn't find any other options.
tortis
commented
Mar 30, 2022
Author
There was a problem hiding this comment.
@BitOne Do you think we can just let this default to "/tmp" for now? It might not be the best for Windows, but I think most users will probably set the dump_dir if they are going to use this anyway right?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Two new INI settings have been added called
meminfo.dump_on_limitandmeminfo.dump_dir. When dump_on_limit is enabled, meminfo will attemptto create a heap dump when an OOM error is detected in the
dump_dirdirectory.
OOM errors are detected by registering an error handler, then checking
for a prefix of "Allowed memory size of" on the error message.
dump_diron windows?resolves #122