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.