Snitchley
V2EX  ›  DevOps

Memcached 每隔一段时间就无法连接

  •  
  •   Snitchley · Jul 9, 2016 · 5409 views
    This topic created in 3601 days ago, the information mentioned may be changed or developed.

    一台配置还不错的服务器, Memcached 每隔一段时间(几十天)就连接超时,大概会有哪些可能呢?

    比如用 telnet 测试:

    $ telnet localhost 11211
    Trying ::1...
    Trying 127.0.0.1...
    

    然后就卡住了。

    2 replies    2016-07-31 11:56:55 +08:00
    adrianzhang
        1
    adrianzhang  
       Jul 9, 2016
    sysctl -a | grep somaxconn
    su - 运行 memcached 的用户
    ulimit -n

    把这些结果贴一下
    Snitchley
        2
    Snitchley  
    OP
       Jul 31, 2016
    sysctl -a | grep somaxconn 的结果:

    net.core.somaxconn = 128

    切换到 memcache 用户之后 ulimit -n 的结果:

    1024

    貌似都是默认值……
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2353 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 16:08 · PVG 00:08 · LAX 09:08 · JFK 12:08
    ♥ Do have faith in what you're doing.