如何解决redis高并发客户端频繁time out

2025-04-17 00:25:05
推荐回答(1个)
回答1:

最近刚在一个大型活动中大量使用了Redis,前几次线上高并发模拟的确出现了类似题主的问题。修正方式有二:
1.服务器对TCP和HTTP的限制(直接拒绝或超时)
2.Redis对并发数的限制(maxclients参数,Once the limit is reached Redis will close all the new connections sending an error 'max number of clients reached'.)

对了,我的平台是Windows+.Net+Redis(ServiceStack)