Phpredis-php connection redis error Redisserverwentaway

Source: Internet
Author: User
Tags pconnect
I used redis in my project. After I went online, I found that I often reported a Redisserverwentaway error or readerroronconnection. I didn't have a clue when I checked some information, but I didn't report an error when I switched the connection method from connect to pconnect, but I'm afraid there will be problems when there will be more users in the future... I used redis in my project. After going online, I found that I often reported the Redis server went away error or read error on connection. I had no clue when I checked some information, however, if the connection mode is changed from connect to pconnect, no error will be reported. But if there are more users in the future, there will be problems. Do you have any solutions?
At present, the website pv20 million uv is less than 30 thousand
Phpredis extension is used.

Reply content:

I used redis in my project. After going online, I found that I often reported the Redis server went away error or read error on connection. I had no clue when I checked some information, however, if the connection mode is changed from connect to pconnect, no error will be reported. But if there are more users in the future, there will be problems. Do you have any solutions?
At present, the website pv20 million uv is less than 30 thousand
Phpredis extension is used.

How many redis servers do you have?
What is the number of connections of the redis service?
What is the load on the redis server?

Eliminate problems from these aspects

You need to check the memory used to run the redis server and the memory usage after the redis data is filled.
If the memory usage reaches 1, 2 GB, and data is frequently written, redis will take up cpu and I/o to slow down the system when saving data to the disk.

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.