-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Check session.gc_probability so tmp/sessions files don't grow out of control #1910
Comments
I think we can run a manual cleanup function as a Piwik Scheduled task Something like
|
(In [3548]) refs #1910 - set expiry on anonymous user dashboard layouts |
matt: on demo.piwik.org, session.gc_probability = 0 ... which means garbage collection never runs. AFAIK this is a web server configuration error. |
looking at gerritvanaaken's tweet, the ftp user ID can't access the tmp files created under the web server user ID (which is an expected permission issue). |
I wonder if it would
Requires experimentation |
Judging from the comments in php.ini, I think the behaviour on the demo was Debian-specific. In a standard PHP build, if session.gc_probability is undefined, it defaults to 1. Looking at the PHP source, garbage collection is triggered at the end of session_start(). So, I'll set session.gc_probability to 1 if zero, and we're using a local session folder. |
(In [3552]) fixes #1910 |
@mattab @robocoder I think setting |
@Jakhotiya would you mind creating a new issue to report this problem? This issue has been closed for a few years so it's better to create a new one. |
@Jakhotiya if you read my comment, setting it to 1 makes sense for local session files. If you're using some other session handler, you have to know what you signed up for and adapt the config/code accordingly. |
@mattab opened [issue](#15274 |
On the demo server, there are thousands of session files in tmp/sessions.
I also saw a tweet complaining about these: http://translate.googleusercontent.com/translate_c?hl=en&sl=auto&tl=en&u=http://twitter.com/gerritvanaaken/statuses/16796496468905984&rurl=translate.google.com&twu=1&usg=ALkJrhgTQd9DhFc-ekLd1yoPAtBVLTADDw
What is the solution to this problem, could we purge on a regular basis the out of date session files?
The text was updated successfully, but these errors were encountered: