希望能得到关于以下间歇性Memcache连接失败可能原因的建议:
Memcache::connect(): Server 127.0.0.1 (tcp 11211, udp 0) failed with:
Only one usage of each socket address (protocol/network address/port) is normally permitted.
据我观察,PHP脚本只在构建控制器时尝试打开连接,即没有多次尝试打开连接。错误报告出现在尝试打开连接的唯一位置。
我还查看了memcached统计信息,似乎没有问题:
array(36) {
["pid"]=> string(4) "5788"
["uptime"]=> string(6) "731274"
["time"]=> string(10) "1533137924"
["version"]=> string(16) "1.4.5_4_gaa7839e
["pointer_size"]=> string(2) "64"
["curr_connections"]=> string(1) "2"
["total_connections"]=> string(8) "31881420"
["connection_structures"]=> string(3) "163"
["cmd_get"]=> string(8) "26219501"
["cmd_set"]=> string(8) "17532714"
["cmd_flush"]=> string(4) "1110"
["get_hits"]=> string(8) "25834764"
["get_misses"]=> string(6) "384737"
["delete_misses"]=> string(1) "5"
["delete_hits"]=> string(7) "1252043"
["incr_misses"]=> string(1) "0"
["incr_hits"]=> string(1) "0"
["decr_misses"]=> string(1) "0"
["decr_hits"]=> string(1) "0"
["cas_misses"]=> string(1) "0"
["cas_hits"]=> string(1) "0"
["cas_badval"]=> string(1) "0"
["auth_cmds"]=> string(1) "0"
["auth_errors"]=> string(1) "0"
["bytes_read"]=> string(11) "12021422144"
["bytes_written"]=> string(12) "163830241155"
["limit_maxbytes"]=> string(10) "4294967296"
["accepting_conns"]=> string(1) "1"
["listen_disabled_num"]=> string(1) "0"
["threads"]=> string(1) "4"
["conn_yields"]=> string(1) "0"
["bytes"]=> string(8) "89537575"
["curr_items"]=> string(5) "15811"
["total_items"]=> string(7) "2871704"
["evictions"]=> string(1) "0"
["reclaimed"]=> string(6) "570282"
}
如果系统运行在Windows Server上,则会影响某些事情。