• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Session: Error while trying to free lock for ci_session

#11
(03-21-2017, 12:14 PM)spjonez Wrote: Our staging area doesn't have the same traffic as our current production box so I can't say 100% yet, but I can say it hasn't happened once so far. Given how often it occurred before and that the steps I used to reproduce it before no longer cause the error I'm leaning towards it being solved.

I went ahead and upgraded to phpredis 3.1.1 and igbinary 2.0.1. Although it seems like the rate of incidence of the lock errors has decreased, I haven't entirely eliminated it. It's possible that I might not have installed some package correctly since I'm no longer reliant on the default Ubuntu packages. My installation process is detailed below. Does yours look similar? I'm particularly unsure about installing phpredis 3.1.1.



apt install build-essential php-pear php7.0-dev

# Install igbinary
pecl install igbinary
echo "; Load igbinary extension
extension=igbinary.so

; Use igbinary as session serializer
;session.serialize_handler=igbinary

; Enable or disable compacting of duplicate strings
; The default is On.
igbinary.compact_strings=On

; Use igbinary as serializer in APC cache (3.1.7 or later)
;apc.serializer=igbinary" > /etc/php/7.0/mods-available/igbinary.ini
ln -sf /etc/php/7.0/mods-available/igbinary.ini /etc/php/7.0/fpm/conf.d/20-igbinary.ini
ln -sf /etc/php/7.0/mods-available/igbinary.ini /etc/php/7.0/cli/conf.d/20-igbinary.ini

# Install phpredis
cd /root
git clone https://github.com/phpredis/phpredis.git
cd phpredis
git checkout tags/3.1.1 -b 3.1.1
phpize
./configure --enable-redis-igbinary
make && make install
cd /root
rm -rf phpredis
echo "extension=redis.so" > /etc/php/7.0/mods-available/redis.ini
ln -sf /etc/php/7.0/mods-available/redis.ini /etc/php/7.0/fpm/conf.d/20-redis.ini
ln -sf /etc/php/7.0/mods-available/redis.ini /etc/php/7.0/cli/conf.d/20-redis.ini

# Check igbinary installation
php -i | grep igbinary
/etc/php/7.0/cli/conf.d/20-igbinary.ini,
igbinary
igbinary support => enabled
igbinary version => 2.0.1
igbinary APC serializer ABI => no
igbinary session support => yes
igbinary.compact_strings => On => On
Available serializers => php, igbinary
Registered serializer handlers => php_serialize php php_binary igbinary wddx
Reply

#12
I'm on AWS ElasticBeanstalk. My install script is basically the same:

Code:
commands:
 01_redis_install:
   cwd: /home/ec2-user/phpredis-3.1.1
   test: '[ ! -f /etc/php.d/redis.ini ]'
   command: 'phpize && ./configure --enable-redis && make && make install && echo extension=redis.so > /etc/php.d/redis.ini'
 02_redis_cleanup:
   cwd: /home/ec2-user
   test: '[ -f /home/ec2-user/phpredis-3.1.1/README.markdown ]'
   command: 'sudo rm -rf phpredis-3.1.1'

Are you calling session_write_close on every AJAX call you make?
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.