-
-
Notifications
You must be signed in to change notification settings - Fork 366
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
Temp folder full #1258
Comments
Thanks for the great report 👍 This might be the opcache directory: bref/runtime/layers/function/php.ini Lines 11 to 20 in 2f78b22
With FPM, opcache stores things in memory. In the "function" layer, we store on disk because the PHP process is restarted between invocations. I also wonder if APCu might not be the culprit here 🤔 Because I find it curious that opcache's cache would grow infinitely. (or maybe you use a Doctrine "file" cache which caches data as PHP code in order to use opcache when reading the file, which leads to the evergrowing opcache cache). Maybe Doctrine uses APCu, and APCu stores stuff in the same "space" as opcache. What can be done? If you use Also as you mentioned the Finally maybe it's worth understand which part specifically causes the issue: is this opcache directly? (in which case fine-tuning its config may help https://tideways.com/profiler/blog/fine-tune-your-opcache-configuration-to-avoid-caching-suprises) |
Thanks a lot for your help.
|
Is it possible that Doctrine is storing query results in its cache folder (speaking of This can explain why Edit: if so, |
The folder that grow bigger and bigger is |
Yes, If |
I tried to
An issue has been open for the same issue here: doctrine/orm#9917 |
Hello,
Lately, we came across the following issue using bref and lambda.
cache.WARNING: Failed to save key "0c97290e3f217e7b24eed5e136876318" of type Doctrine\ORM\Query\ParserResult: fwrite(): Write of 5359 bytes failed with errno=28 No space left on device
At first, we though that it came from the code using the /tmp folder and making it full.
But after some investigation, I found out that a folder is created (/tmp/cac0c3b3d1db88ccd79feeec7173b6f1) and grow bigger during the execution until that, sometime the cache become full.
I found out that doctrine (and maybe some other library) are writting in this folder but it only happens with this layer: ${bref:layer.php-81}.
With the layer: ${bref:layer.php-81-fpm} I don't have any issue.
We are using a lot of lambda function using both layer and all the event-driven functions (using ${bref:layer.php-81}) have the same issue, all the other don't.
The cache doesn't become full on every lambda but this folder (/tmp/cac0c3b3d1db88ccd79feeec7173b6f1) is always created.
I found out that the folder name change if we change the layer version, else it always stay the same.
Also, the tmp folder look like this just before it fails:
A part of our serverless.yml:
Also, increasing the ephemeral storage of the lambda resolve the issue (at least for some lambda execution) but I hope there is a better solution.
I don't know if this is a bug or if I miss something but in any case, help is welcome :)
Thanks in advance
The text was updated successfully, but these errors were encountered: