Skip to content

$HOME/.symfony5/tmp is 18 GB, contains 4.272.171 files (folders?) and it's depleting the ext4 filesystem inodes (Linux) #553

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

Closed
ZaneCEO opened this issue Dec 29, 2024 · 1 comment · Fixed by #566

Comments

@ZaneCEO
Copy link

ZaneCEO commented Dec 29, 2024

I'm running Symfony CLI version 5.10.4 (2024-10-11T14:05:11Z - stable) on a pre-production env. I use it to run custom Symfony 6.3.12 commands and for composer.

The server runs Ubuntu 22.04.5 LTS, the filesystem is ext4 and the site is on NGINX and PHP-FPM, so the issue is not related to #383.

Today I got a "low inodes" alert, and it is due to the folder $HOME/.symfony5/tmp: it contains 4.272.171 files, for a total of 18 GB (the huge number of files is more important than the total size). ls -la takes a lot of time to compute, but then report something like this:

....
drwxr-xr-x 2 <username> www-data 4.0K Jun 24  2024 cpsdnr46fqoqma0f9c90/
drwxr-xr-x 2 <username> www-data 4.0K Jun 24  2024 cpsdntk6fqoqlsva0240/
drwxr-xr-x 2 <username> www-data 4.0K Jun 24  2024 cpsdo046fqoqkia7fv8g/
...

This is just a part of the list, and those folders were created Jun 24 2024 (today is 29 Dec 2024, so those folders are 6 months old).

I tried to ls a few folders, but they all look empty:

$ ls -la cpsdnr46fqoqma0f9c90
total 170448
drwxr-xr-x 2 <username> www-data      4096 Jun 24  2024 .
drwxr-xr-x 1 <username> www-data 174489600 Dec 29 09:51 ..

I run about a dozen of Symfony projects, all on different versions (from 4.4 to 7.2) and this is the first time I get this issue.

I'm glad to provide additional info.

@javiereguiluz
Copy link
Contributor

I can confirm this too.

The directory has more than 40k subdirectories:

❯ find ~/.symfony5/tmp -type d -mindepth 1 -maxdepth 1 | wc -l
41,722

The oldest subdirectory is from January 2022. All of them are empty except the most recent ones, so it doesn't take much disk space:

❯ du -sh ~/.symfony5/tmp
5.6M

ZaneCEO added a commit to TurboLabIt/webstackup that referenced this issue Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants