markus_blue_tomato Posted February 5, 2019 Share Posted February 5, 2019 I'm looking for some help with Sessions in Redis and Memcached. First, I discovered this issue in the third-party module SessionHandlerRedis from @netcarver After reading more about Session in PHP with Redis, I found that PHP can handle this (and also with memcached) out of the box without any third party module. I tried it with Redis and memcached so in this cases I added following to my php.ini session.save_handler = redis session.save_path = "tcp://127.0.0.1:6379" session.save_handler = memcached session.save_path = "127.0.0.1:11211" Everything went well and sessions were saved to redis/memcached in both methods. ..... but: The only thing what does not work, was the upload of multiple files at once. So when I upload two images, only the image which are last finished are saved to the database. In the JSON response of the AJAX upload request, the page-id of the file where in both files the same id. Sometimes with memcached the response failed because the response was no valid JSON and the response was the login page of processwire. I opened an issue in processwire-issues but @ryan hasn't worked with this kind of session handling since yet: https://github.com/processwire/processwire-issues/issues/798 Does any body uses Redis or memcached as session handling and has also found this bug? Link to comment Share on other sites More sharing options...
markus_blue_tomato Posted February 5, 2019 Author Share Posted February 5, 2019 I found a solution. I added following to my php.ini: redis.session.locking_enabled = 1 redis.session.lock_expire = 60 redis.session.lock_retries = -1 4 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now