Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPHP session. Fatal error with message "Connection closed" #571
Comments
|
Hello, in my production with this bug too. nginx session.name => PHPSESSID => PHPSESSID Error: What should I do? |
|
Most likely your redis server is not externally accessible. You need to edit your redis config and set it's bind address to your public ip or 0.0.0.0 to bind to any address. |
|
This error occurs about 200 times a day from 400 000 requests. |
|
I experienced the same behavior. Problem occurs about 20 times in ~150k requests. No connection problems with this solution though ... Edith says: We are using nginx with php5-fpm (5.5) and redis sentinel |
|
I am seeing this same problem with php 7 phpredis and amazon elasticache |
|
@DartBond I'm having the same sporadic issue. Did you manage to solve this? |
|
I'm also having this issue on AWS EC2 + Elasticache. Only a few random times in many connections, but enough to be a problem. |
|
@gianpaolodn, sorry for time to reply. |
|
@DartBond in my case the problem is the firewall and ipv6. |
|
I found that my problem was creating too many new connections to the redis server, so changing to use "pconnect" instead of "connect" and adding ?persistent=1 in the session handle URL fixed the issue for me.. |
|
Old issue without activity for a long time. Please open new issue if you have the same issue with the latest stable or develop version of phpredis. |
Good afternoon, dear developer!
PHP version 5.4.36
PhpRedis version 2.2.7
Redis server 2.8.19
Apache setting:
php_admin_value session.name sid
php_admin_value session.auto_start 1
php_admin_value session.save_handler redis
php_admin_value session.save_path "tcp://x.x.x.x:6379?auth=password&database=0&timeout=60"
Everything works fine. In the evenings, when attendance increases the project, the project begins to run rough.
The logs appear thousands of errors:
PHP Fatal error: Uncaught exception 'RedisException' with message 'Connection closed'
in [no active file]:0\nStack trace:\n#0 {main}\n thrown in [no active file] on line 0, referer: http://...
What should I do?
Maybe comment out all the exceptions zend_throw_exception(*) in the source code? =)