memcached: Error: Server at 127.0.0.1:11211 not available
LOG
Error: Server at 127.0.0.1:11211 not available
at Client.memcachedCommand [as command] (/home/hello.com/node_modules/memcached/lib/memcached.js:306:70)
at Client.get (/home/hello.com/node_modules/memcached/lib/memcached.js:830:10)
But Memcached active.
# service memcached status
● memcached.service - memcached daemon
Loaded: loaded (/lib/systemd/system/memcached.service; disabled)
Active: active (running) since Thu 2017-03-23 08:35:35 EDT; 10s ago
Main PID: 1538 (memcached)
CGroup: /system.slice/memcached.service
└─1538 /usr/bin/memcached -m 64 -p 11211 -u memcache -l 127.0.0.1
Mar 23 08:35:35 trampamp systemd[1]: Starting memcached daemon...
Mar 23 08:35:35 trampamp systemd[1]: Started memcached daemon.
# telnet 127.0.0.1 11211
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
stats
STAT pid 1538
STAT uptime 876
STAT time 1490273409
STAT version 1.4.21
STAT libevent 2.0.21-stable
STAT pointer_size 64
STAT rusage_user 0.025996
STAT rusage_system 0.006998
STAT curr_connections 5
STAT total_connections 8
STAT connection_structures 6
STAT reserved_fds 20
STAT cmd_get 0
STAT cmd_set 0
STAT cmd_flush 2
STAT cmd_touch 0
STAT get_hits 0
STAT get_misses 0
STAT delete_misses 0
STAT delete_hits 0
STAT incr_misses 0
STAT incr_hits 0
STAT decr_misses 0
STAT decr_hits 0
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT touch_hits 0
STAT touch_misses 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 46
STAT bytes_written 15
STAT limit_maxbytes 67108864
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT threads 4
STAT conn_yields 0
STAT hash_power_level 16
STAT hash_bytes 524288
STAT hash_is_expanding 0
STAT malloc_fails 0
STAT bytes 0
STAT curr_items 0
STAT total_items 0
STAT expired_unfetched 0
STAT evicted_unfetched 0
STAT evictions 0
STAT reclaimed 0
STAT crawler_reclaimed 0
STAT lrutail_reflocked 0
END
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 8
- Comments: 16
Looks like I got it!
this is how my memcached is started
and this was the client creation
when i corrected maxValue to the value <= 20Mb, for example 10485760
in logs instead of those unexpected errors i sometimes see for too big items
which is perfectly fine and all other write operations succeed
I think I managed to consistently reproduce
Error: Connection readyState is set to readOnly
locally. Basically, you need memcached server running + stress test it with parallel writes. For me it starts to break at 40 parallel writes (but below I have it set to 100)Considering that nothing else uses this memcached server & I have only one
connection
instance, I think its a library fault that it doesn’t try to queue writes… nor limit how many writes can do at a time & instead seems to just kill memcache.Steps (using jest / integration test):