Sometimes rediswentaway occurs when online php is connected to redis. what causes this?

Source: Internet
Author: User
The frequency is not very high, but it will happen. I directly went to the official redis website and configured it with the default redis. conf .. The frequency is not very high, but it will happen. I directly went to the official redis website and configured it with the default redis. conf ..

Reply content:

The frequency is not very high, but it will happen. I directly went to the official redis website and configured it with the default redis. conf ..

This error is caused by the security mechanism of selinux. When I solve this error and run the server, the redis. php can run normally in the browser. Therefore, the reason for Redis server went away is found. Selinux. Solution: [php] view plain copy print? /Usr/bin/setenforce is a temporary enable used to modify the real-time running mode of SELinux: setenforce 1 ---- set SELinux to enforcing mode to temporarily disable: setenforce 0 ---- set SELinux to permissive mode. if you want to completely disable SELinux, set selinux to 0 in/etc/sysconfig/selinux, or in/etc/grub. add this parameter/usr/bin/setstatus-v in conf.

No connection. you need to bind an ip address to the remote connection.

Add your ip address bind 127.0.0.1: 1 yourip to the configuration below in redis. conf.

Now, can you connect directly to the client? Use php to connect

Change the request size to pconnect.
Http://blog.csdn.net/u0134744...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.