On Sat, Dec 22, 2012 at 11:58 PM, Greg Andrews <
hva...@gmail.com>
wrote:
> The 'E' is for Error. The rest of the error name is 'TIMED OUT'.
Yes, I've discovered that after staring at the string.
> Your Node.js application has a timeout defined
No timeout explicitly defined. I'm using `node_redis` to connect. In
fact, looking at the code and at the `node_redis` documentation, I don't
even see the possibility to set a timeout.
I would like to lower the timeout to trigger the error on my development
system.
> or it gives up on the command/response and logs the error you see.
The weird thing is that the error somehow bypasses the normal error
handling. Normally, when the app listens to the `node_redis` `error`
event, then the connection is reopened. In the case of `ETIMEDOUT`, the
`error` event is somehow not emitted, and there is no attempt to
reconnect. Relevant code from `node_redis` (possibly the first `return`
is hit):
var message = "Redis connection to " + this.host + ":" + this.port
+ " failed - " + msg;
if (this.closing) {
return;
}
if (exports.debug_mode) {
console.warn(message);
}
this.flush_and_error(message);
this.connected = false;
this.ready = false;
this.emit("error", new Error(message));
// "error" events get turned into exceptions if they aren't
listened for. If the user handled this error
// then we should try to reconnect.
this.connection_gone("error");
> There isn't just one cause of slow responses from Redis, so the tiny
> amount of info you gave us doesn't point to the cause of your error
> messages.
According to OpenRedis, the machine I am on is underutilized. In fact, I
was the first user of OpenRedis on Joyent (they set up the server
specifically on my request). Output of `INFO` is attached below.
> The most recent versions of Redis have a "slow log" file where
> long-running commands will be written.
That log is empty, as expected: My app is extremely light weight on the
database. There are only a couple of bytes written once every couple of
minutes or so. Also, while there are LUA scripts, they are not long
running.
Greg, thanks a lot for the detailed reply!
Finally, the output of `INFO`:
# Server
redis_version:2.6.6
redis_git_sha1:ed709555
redis_git_dirty:0
redis_mode:standalone
os:Linux 3.6.5-joyent-ubuntu-12-opt x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.6.3
process_id:26309
run_id:226b4a8911fd1608b1f4f80ef51d64519bbaa6e8
tcp_port:10657
uptime_in_seconds:1905326
uptime_in_days:22
lru_clock:1404348
# Clients
connected_clients:3
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
# Memory
used_memory:462968
used_memory_human:452.12K
used_memory_rss:2367488
used_memory_peak:4645600
used_memory_peak_human:4.43M
used_memory_lua:35840
mem_fragmentation_ratio:5.11
mem_allocator:jemalloc-3.2.0
# Persistence
loading:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1356217515
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:0
rdb_current_bgsave_time_sec:-1
aof_enabled:1
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:0
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_current_size:328883
aof_base_size:18871
aof_pending_rewrite:0
aof_buffer_length:0
aof_rewrite_buffer_length:0
aof_pending_bio_fsync:0
aof_delayed_fsync:0
# Stats
total_connections_received:85583
total_commands_processed:1733254
instantaneous_ops_per_sec:0
rejected_connections:0
expired_keys:0
evicted_keys:0
keyspace_hits:1480046
keyspace_misses:111723
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:277
# Replication
role:master
connected_slaves:0
# CPU
used_cpu_sys:1973.72
used_cpu_user:2489.85
used_cpu_sys_children:0.00
used_cpu_user_children:0.00
# Keyspace
db0:keys=18,expires=0