Node-redis: 2時間後のECONNRESET

作成日 2015年06月11日  ·  4コメント  ·  ソース: NodeRedis/node-redis

現在、DockerのUbuntu12.04コンテナーでアプリケーションを実行しています。 docker1.5とnode-redis0.12.1を実行しています。 redis接続は、2時間後に毎回次のエラーを受け取ります。
`` `エラー:web-redis01.twecへのRedis接続。 com:6379が失敗しました

`` `` ``
RedisClient.on_error(/home/node/tjs0006/node_modules/redis/index.js:196:24)

ソケットで。(/home/node/tjs0006/node_modules/redis/index.js:106:14)

Socket.emitで(events.js:95:17)

net.js:441:14で

process._tickCallback(node.js:448:13) `` `
`` `` ``

ログが来ています...

question

全てのコメント4件

Stream connected web-redis01.twec.com:6379 id 1
Using default parser module: javascript
checking server ready state...
send web-redis01.twec.com:6379 id 1: *1
$4
info

send_command buffered_writes: 0  should_buffer: false
net read web-redis01.twec.com:6379 id 1: $1993
# Server
redis_version:2.8.19
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:a789ed9377dc12b9
redis_mode:standalone
os:Linux 3.13.0-45-generic x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.6.3
process_id:1478
run_id:6edf95e3c651843f8c26ea0e1030717d82419fcd
tcp_port:6379
uptime_in_seconds:9604215
uptime_in_days:111
hz:10
lru_clock:7985573
config_file:/etc/redis/redis.conf

# Clients
connected_clients:521
client_longest_output_list:0
client_biggest_input_buf:817
blocked_clients:108

# Memory
used_memory:668850272
used_memory_human:637.87M
used_memory_rss:715665408
used_memory_peak:4418948960
used_memory_peak_human:4.12G
used_memory_lua:35840
mem_fragmentation_ratio:1.07
mem_allocator:jemalloc-3.6.0

# Persistence
loading:0
rdb_changes_since_last_save:232
rdb_bgsave_in_progress:0
rdb_last_save_time:1434048755
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:8
rdb_current_bgsave_time_sec:-1
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok

# Stats
total_connections_received:14731602
total_commands_processed:1397335226
instantaneous_ops_per_sec:60
total_net_input_bytes:111442619264
total_net_output_bytes:166924266821
instantaneous_input_kbps:4.35
instantaneous_output_kbps:0.61
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:1320224
evicted_keys:0
keyspace_hits:325125706
keyspace_misses:358675060
pubsub_channels:1
pubsub_patterns:0
latest_fork_usec:61950

# Replication
role:master
connected_slaves:0
master_repl_offset:0
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:45186.85
used_cpu_user:22707.47
used_cpu_sys_children:25963.62
used_cpu_user_children:203823.30

# Keyspace
db0:keys=88916,expires=2405,avg_ttl=29636490


Redis server ready.
send web-redis01.twec.com:6379 id 1: *3
$4
sadd
$25
tjs0006-dev:todaysBatches
$18
batch_514C6E711866

send_command buffered_writes: 0  should_buffer: false
send web-redis01.twec.com:6379 id 1: *3
$3
set
$19
tjs0006-dev:lastRun
$24
2015-06-11T19:02:11.190Z

send_command buffered_writes: 0  should_buffer: false
net read web-redis01.twec.com:6379 id 1: :1

net read web-redis01.twec.com:6379 id 1: +OK

send web-redis01.twec.com:6379 id 1: *3
$5
lpush
$36
tjs0006-dev:batch_514C6E711866:error
$180
{"message":"Non-successful status code (500) returned","location":"RENEW QUEUE:Get Customer","batchId":"batch_514C6E711866","businessDate":"","file":"","cardNumber":"466708132564"}

send_command buffered_writes: 0  should_buffer: false
net read web-redis01.twec.com:6379 id 1: :1

send web-redis01.twec.com:6379 id 1: *4
$6
lrange
$36
tjs0006-dev:batch_514C6E711866:error
$1
0
$2
-1

send_command buffered_writes: 0  should_buffer: false
net read web-redis01.twec.com:6379 id 1: *1
$180
{"message":"Non-successful status code (500) returned","location":"RENEW QUEUE:Get Customer","batchId":"batch_514C6E711866","businessDate":"","file":"","cardNumber":"466708132564"}

send web-redis01.twec.com:6379 id 1: *4
$6
lrange
$38
tjs0006-dev:batch_514C6E711866:warning
$1
0
$2
-1

send_command buffered_writes: 0  should_buffer: false
net read web-redis01.twec.com:6379 id 1: *0

Redis connection to web-redis01.twec.com:6379 failed - read ECONNRESET
Error: Redis connection to web-redis01.twec.com:6379 failed - read ECONNRESET
    at RedisClient.on_error (/home/node/tjs0006/node_modules/redis/index.js:196:24)
    at Socket.<anonymous> (/home/node/tjs0006/node_modules/redis/index.js:106:14)
    at Socket.emit (events.js:95:17)
    at net.js:441:14
    at process._tickCallback (node.js:448:13)
Error: Redis connection to web-redis01.twec.com:6379 failed - read ECONNRESET
    at RedisClient.on_error (/home/node/tjs0006/node_modules/redis/index.js:196:24)
    at Socket.<anonymous> (/home/node/tjs0006/node_modules/redis/index.js:106:14)
    at Socket.emit (events.js:95:17)
    at net.js:441:14
    at process._tickCallback (node.js:448:13)
error: Forever detected script exited with code: 1
error: Script restart attempt #1

他のライブラリをテストし、同じ問題を受け取りました。 node-redisに固有のようには見えません。

@strumwolf :まったく同じ問題があります。 あなたはそれを解決しましたか?

私はDocker(および牧場主)でも使用しています。これは私のコンテナーのログです:

2016年2月11日17:15:11Redis接続OK
2016年2月11日17:15:11クライアントは「テスト」にサブスクライブします
2016年2月11日19:15:32REDISエラー{[エラー:xxx.euw1.cache.amazonawsへのRedis接続。 com:6379が失敗しました
2016年2月11日19:15:32Redisの再接続
2016年2月11日19:15:32Redis接続OK
2016年2月11日19:15:32クライアントは「テスト」にサブスクライブします
2016年2月11日21:15:41REDISエラー{[エラー:xxx.euw1.cache.amazonawsへのRedis接続。 com:6379が失敗しました
2016年2月11日21:15:41Redisの再接続
2016年2月11日21:15:41Redis接続OK
2016年2月11日21:15:41クライアントは「テスト」にサブスクライブします
2016年2月11日23:15:50REDISエラー{[エラー:xxx.euw1.cache.amazonawsへのRedis接続。 com:6379が失敗しました
2016年2月11日23:15:50Redisの再接続
2016年2月11日23:15:50Redis接続OK

あなたが言ったように2時間ごとに、私はECONNRESETを持っています。 再接続は機能しているようで、サブスクリプションも機能しているようです。 この再接続の直後に新しいメッセージをプッシュすると、サブスクライバーはそのメッセージを受信します。

しかし、特定の時間(次の再接続に近づ​​く)待つと、プッシュしたメッセージはサブスクライバーによって処理されなくなります。 どこかで別のタイムアウトのようです...

よろしくお願いします。

@cabrinoob 、私は問題を解決しましたが、それはとても昔のことで、解決策を覚えていません。 さらに、私は彼が発行した会社でもう働いていないため、戻って調べることができません。 ごめんなさい。

このページは役に立ちましたか?
0 / 5 - 0 評価