Skip to content
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

php_session_gc_probability: 1 overwrites Ubuntu default #216

Closed
stephankn opened this issue Sep 3, 2017 · 38 comments · May be fixed by #315
Closed

php_session_gc_probability: 1 overwrites Ubuntu default #216

stephankn opened this issue Sep 3, 2017 · 38 comments · May be fixed by #315
Labels

Comments

@stephankn
Copy link

The role specifies a default setting for php.ini:

php_session_gc_probability: 1

This conflicts with the default setting of at least Ubuntu 16.04 LTS (and probably other debian based setups). These turn gc off by default and install a cron job to clean up sessions every 30 minutes:

# cat /etc/cron.d/php
# /etc/cron.d/php@PHP_VERSION@: crontab fragment for PHP
#  This purges session files in session.save_path older than X,
#  where X is defined in seconds as the largest value of
#  session.gc_maxlifetime from all your SAPI php.ini files
#  or 24 minutes if not defined.  The script triggers only
#  when session.save_handler=files.
#
#  WARNING: The scripts tries hard to honour all relevant
#  session PHP options, but if you do something unusual
#  you have to disable this script and take care of your
#  sessions yourself.

# Look for and purge old sessions every 30 minutes
09,39 *     * * *     root   [ -x /usr/lib/php/sessionclean ] && /usr/lib/php/sessionclean

I suggest to change the default to php_session_gc_probability: 0 to keep the ubuntu process functional.

Seems to be in line with the PHP documentation also considering the request-based GC flawed.
http://php.net/manual/en/function.session-gc.php

@stale
Copy link

stale bot commented Mar 6, 2020

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Mar 6, 2020
@stephankn
Copy link
Author

The issue still exists with Ubuntu 18.04.4 LTS.

@stale
Copy link

stale bot commented Apr 1, 2020

This issue is no longer marked for closure.

@stale stale bot removed the stale label Apr 1, 2020
@stale
Copy link

stale bot commented Jun 30, 2020

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Jun 30, 2020
@stephankn
Copy link
Author

as of today, problem still exists.

@stale
Copy link

stale bot commented Jul 19, 2020

This issue is no longer marked for closure.

@stale stale bot removed the stale label Jul 19, 2020
@stale
Copy link

stale bot commented Oct 17, 2020

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stephankn
Copy link
Author

issue still current. I linked a PR to change the default

@stale
Copy link

stale bot commented Oct 17, 2020

This issue is no longer marked for closure.

@stale stale bot removed the stale label Oct 17, 2020
@geerlingguy
Copy link
Owner

I typically keep this role using the PHP defaults where possible, and note that the current default seems to still be 1: https://www.php.net/manual/en/session.configuration.php#ini.session.gc-probability

@stale
Copy link

stale bot commented Jan 21, 2021

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Jan 21, 2021
@stephankn
Copy link
Author

I understand, that the default value of config of php.net is 1. Still, the same php.net documentation recommends to change this. And on setups running Ubuntu it is broken when installing PHP with this role, as then two conflicting settings are enabled. So at least for Ubuntu I consider it as a bug. Either the value has to be 0 on Ubuntu or the cron-job on Ubutu needs to be disabled.

@stale
Copy link

stale bot commented Jan 28, 2021

This issue is no longer marked for closure.

@stale stale bot removed the stale label Jan 28, 2021
@stale
Copy link

stale bot commented Apr 30, 2021

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Apr 30, 2021
@stephankn
Copy link
Author

any update in merging this?

@stale
Copy link

stale bot commented May 7, 2021

This issue is no longer marked for closure.

@stale stale bot removed the stale label May 7, 2021
@stale
Copy link

stale bot commented Aug 5, 2021

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Aug 5, 2021
@stephankn
Copy link
Author

This point is still relevant and I would like to see the change merged

@stale stale bot added the stale label Nov 7, 2021
@stephankn
Copy link
Author

still valid

@stale
Copy link

stale bot commented Nov 12, 2021

This issue is no longer marked for closure.

@stale stale bot removed the stale label Nov 12, 2021
@stale
Copy link

stale bot commented Feb 12, 2022

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Feb 12, 2022
@racke
Copy link

racke commented Feb 17, 2022

Makes sense to me as well

@stephankn
Copy link
Author

this is still relevant

@stale
Copy link

stale bot commented Mar 16, 2022

This issue is no longer marked for closure.

@stale stale bot removed the stale label Mar 16, 2022
@stale
Copy link

stale bot commented Jun 18, 2022

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Jun 18, 2022
@stephankn
Copy link
Author

to my understanding distributions still use this, so issue still valid.

@stale
Copy link

stale bot commented Jun 29, 2022

This issue is no longer marked for closure.

@stale stale bot removed the stale label Jun 29, 2022
@stale
Copy link

stale bot commented Oct 15, 2022

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Oct 15, 2022
@stephankn
Copy link
Author

to my understanding distributions still use this, so issue still valid.

@stephankn
Copy link
Author

Hey, stale bot. This issue is still valid. Remove the label.

@stale
Copy link

stale bot commented Nov 6, 2022

This issue is no longer marked for closure.

@stale stale bot removed the stale label Nov 6, 2022
@stale
Copy link

stale bot commented May 22, 2023

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label May 22, 2023
@stephankn
Copy link
Author

I still consider this valid

@stale
Copy link

stale bot commented May 29, 2023

This issue is no longer marked for closure.

@stale stale bot removed the stale label May 29, 2023
@github-actions
Copy link

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@github-actions github-actions bot added the stale label Sep 30, 2023
Copy link

github-actions bot commented Dec 2, 2023

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants