Visitor233
V2EX  ›  Redis

Redis 启动警告,恳请懂 redis 的大佬进来指点一下

  •  
  •   Visitor233 · Apr 7, 2020 · 6103 views
    This topic created in 2242 days ago, the information mentioned may be changed or developed.

    问题点:Redis 启动出现两个 Warning 。 一个 TCP backlog setting of 511 somaxconn value of 128; 一个是要求 vm.overcommit_memory=1;

    修复尝试:我按照网上的方法,在 sysctl.conf 文件中新增了 net.core.somaxconn 和 vm.overcommit_memory, 但只有 vm.overcommit_memory 起效果了,而且一旦重启电脑又会重现错误,并未像网上那样永久解决。 运行 sysctl -a 命令显示 net.core.somaxconn 的值一直是 128 。

    错误起因:NET 项目,最近加了 SignalR,前端小程序用了 Websocket 与后端建立实时通信。

    目的:reids 启动不再出现这两个错误。

    PS:中午再回复

    6 replies    2020-04-07 12:55:52 +08:00
    snBDX1b0jJM4ogKd
        1
    snBDX1b0jJM4ogKd  
       Apr 7, 2020 via Android
    主机重启后会丢失,加入开机执行
    kebyn
        2
    kebyn  
       Apr 7, 2020
    `sysctl.conf ` 文件中有多个`vm.overcommit_memory`值,即在你添加前还有一个`vm.overcommit_memory`值,你后面添加的被覆盖了
    Visitor233
        3
    Visitor233  
    OP
       Apr 7, 2020
    感谢回复,这个可以考虑下
    Visitor233
        4
    Visitor233  
    OP
       Apr 7, 2020
    @cs010 感谢回复,这个可以考虑下
    Visitor233
        5
    Visitor233  
    OP
       Apr 7, 2020
    @kebyn 感谢您的回复。但我在 sysctl.conf 文件中查找了,并未有重复值
    scegg
        6
    scegg  
       Apr 7, 2020
    sysctl.conf 生效的方法有:( 1 )重启;( 2 )执行 sysctl -p 。
    对于 vm.overcommit_memory:请检查重启后 sysctl.conf 内是否还有 vm.overcommit_memory 。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5751 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 03:28 · PVG 11:28 · LAX 20:28 · JFK 23:28
    ♥ Do have faith in what you're doing.