-
-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bref using all space in /tmp folder #275
Comments
Thank you for the info! @bubba-h57 might know a bit more about FPM as well. Limiting could make sense, but what are those logs? FPM logs should end up in stderr (per the config, and that's what we want because those end up on CloudWatch). Are those memory dumps like when a segfault happens? Could you check in cloudwatch if there are lines like |
Yes it exited with core dumped. |
If we want to ignore the core dumps altogether, then adding However, I would argue that is probably not what we want to do, because then folks will have coredumps and be ignorant of it. Rather, I suggest that we modify the bootstrap so that after every event, when we check that FPM is still running and restart if it is not, we simultaneously check for any core dumps. If they are present, we read/echo them stdout so that they show up in the cloudwatch logs ... then clean up the mess by deleting Thoughts? |
Sounds really good! Aren't those dump huge memory dumps? Or are they just stack traces? (as you can probably tell I am ignorant on that topic ^^) |
It is a file containing a process's address space (memory) when the process terminates unexpectedly ... you can indeed get a stack trace from it, though it would not be what typical PHP Exception stacktrace would look like. As far as size, the majority of the ones cleaned up would be no size at all, just a zero byte file taking up an inode. For PHP in Lambda ... I suspect a big one to be around 200MB and average around 100mb. But the technical term for that estimation is wild arse guess. :-) But, if I am smellin' what yer steppin' in regarding the size ... it is probably a good idea to default to just cleaning up the '/tmp' dir of any core dumps there and if the developer likes, allow for an environment variable to be set that, if set, will write to CloudWatch. Or maybe even be more clever and if the environment variable is set to an S3_bucket we upload the dump to S3? More configuration options are always complicated ... I mean ... Good. :-) |
@mnapoli In retrospect, I have changed my opinion. I think we should just add |
That sounds good! |
@mnapoli So should we add this to bref? |
@atrope yes let's do this 👍 |
#321 should fix this, this is merged and I built new runtimes: https://runtimes.bref.sh/ Thank you both! |
@mnapoli we should have changelogs for the layers no? |
Ideally yes, I haven't taken the time to set it up yet. My goal would be fix layer versions with Bref versions (tags), #320 might make that possible. That way layers changelog can be in Bref releases. |
Hi,
I was having some issues with our caching files (it writes to /tmp) , telling me that /tmp was full.
Debugging it with i found out that it was core dump logs that were taking all space:
I Managed to mitigate it by adding
rlimit_core = 1
in php-fpm.confIt did solved the problem, but i don't know if we need this for other things so i am holding on PR for this.
Anyone has any comment if we should or shouldn't add this as default value?
Thanks
The text was updated successfully, but these errors were encountered: