Using redis to store sessions |
Hi
Using php7 FPM, CodeIgniter 3.1.2, Redis 3.0.3. After struggling for few hours finding the best setup for using Redis as store engine for sessions I find myself even more confused. I have tried the following setups, and I will be glad if you have some insights of how this should be working. Setup 1: codeignier config PHP Code: $config['sess_driver'] = 'redis'; php.ini as left with default configuration. used session_write_close() immediately after updating session data. Result: Codeigniter is using Redis for storing sessions but then I came across this error on heavy ajax pages: Session: Session: Error while trying to free lock for ci_session:cq399b646bc6lstdhrcrb69k7nvu42r8:lock I understand the logic and need of lock mechanism but anyway, it seems like CodeIgniter is not handling multiple ajax requests simultaneously. Setup 2: codeignier config PHP Code: $config['sess_driver'] = 'files'; php.ini Code: session.save_handler = redis Result: nothing works! I get the following error: Message: is_dir(): Unable to find the wrapper "tcp" - did you forget to enable it when you configured PHP? Filename: drivers/Session_files_driver.php Line Number: 134 Do you guys have any idea of what should be the best way to use redis for storing sessions? (11-01-2016, 01:17 PM)eranhazout Wrote: Hi That's the entire point of locking. (11-01-2016, 01:17 PM)eranhazout Wrote: Setup 2: This can't possibly work ...
Ok, So any other way to make it work and support simultaneous ajax requests?
Ok, I have already created my custom session library.
I will publish it on github soon. Thanks |
Welcome Guest, Not a member yet? Register Sign In |