Skip to content
This repository has been archived by the owner on Aug 10, 2019. It is now read-only.

/usr/lib/php5/sessionclean ignores session settings in /etc/php5/fpm/pool.d/*.conf #136

Open
merlyel opened this issue Jun 28, 2016 · 4 comments

Comments

@merlyel
Copy link

merlyel commented Jun 28, 2016

Distribution: Debian jessie
Architecture: amd64
PHP version: 5.6.20-1~dotdeb+7.1 FPM

I create separate folders for session.path for every fpm pool in /etc/php5/fpm/pool.d/*.conf. For example: /etc/php5/fpm/pool.d/test1.conf:

php_value[session.save_handler] = files
php_value[session.save_path] = /srv/www/test.domain.tld/tmp

Unfortunately /usr/lib/php5/sessionclean does not see these settings as it only reads ini-files.

Would be great if sessionclean could find these additional configs

@benrubson
Copy link

Still the case with PHP 7.0.27-0+deb9u1.
sessionclean is then totally useless if session.save_path is configured in pool.d/*.conf files.
Thx 👍

@martinellimarco
Copy link

martinellimarco commented Feb 1, 2019

still an issue in php7.2, I just found out that I have no inodes left on my partition thanks to this..

@benrubson
Copy link

As a workaround, be sure to set the following into php.ini (values as example) :

session.gc_probability = 1
session.gc_divisor = 100
session.gc_maxlifetime = 604800

Sessions will then be cleaned randomly when PHP pages are reached by visitors.

And you can then also disable the useless sessionclean job (at least on Debian) :

systemctl disable phpsessionclean.timer
systemctl stop phpsessionclean.timer

@martinellimarco
Copy link

Thank you, that's exactly how I solved it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants