Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork125
fix: cleanup temporary directories#566
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| _=os.MkdirAll(filepath.Dir(path),0755) | ||
| } | ||
| returnpath | ||
| returnfilepath.Join(p.tempDir,fmt.Sprintf("%s-router.php",p.Version.Version)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Note for the reviewers: I moved the routing file to the same location as the FPM config.
This way I can always create and clean the directory no matter the SAPI
fabpot left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Regarding cleaning up existing empty directories, can we at least remove the ones that are older than x days?
Uh oh!
There was an error while loading.Please reload this page.
tucksaun commentedFeb 10, 2025
good idea, will do |
Co-authored-by: Fabien Potencier <fabien@potencier.org>
please note that this might take a while because we clean by batches, use `find ~/.symfony5/tmp -type d -mindepth 1 -maxdepth 1 -delete` if you are eager
tucksaun commentedFeb 14, 2025
@fabpot cleanup added. I considered directories as stale after 7 days. wdyt? |
6004fc6 intosymfony-cli:mainUh oh!
There was an error while loading.Please reload this page.
fabpot commentedFeb 14, 2025
Great! Thank you. |
srsbiz commentedFeb 15, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thanks, unfortunately it is somehow not working for me. Are old files removed only on "clean" shutdown of the server? I cannot gracefully stop server with |
tucksaun commentedFeb 15, 2025
AFAICT this error is not related to this PR and is only related to#397 (on which I didn't had the opportunity to work so far) |
srsbiz commentedFeb 15, 2025
Yes, my question is not about this error, but on conditions required for cleanup process to be performed - if it requires "clean" shutdown by calling |
tucksaun commentedFeb 15, 2025
On any shutdown. But your error happens during the shutdown process and things are not necessarily linear in Go so your error might end up stopping the cleaning process early on |

Uh oh!
There was an error while loading.Please reload this page.
Fixes#383
Fixes#553
It also seems logical to work on cleaning any temporary directory while working on cleaning the
~/.symfony5/tmpdirectory so this is a slightly bigger PR.The second commit can extracted though if we want to focus on a single directory for now.
Unfortunately cleaning up previous
tmpdirectories does not seem like a good idea because they can still be in-use.