参考博客:https://zhangxiaoxiang.blog.csdn.net/article/details/98766926?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-4.pc_relevant_baidujshouduan&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-4.pc_relevant_baidujshouduan
在redis的config配置文件把tcp-keepalive改成1-20之间的数