Skip to content

INFO is truncated occasionally #19

@tysonmote

Description

@tysonmote

I'm polling a local Redis 2.6 server with:

client := redis.NewClient("localhost", 0, "")
reply, err := client.Call("INFO")
if err != nil {
    return ""
}
client.Call("QUIT")
return reply.Elem.String()

(And the equivalent with the non-exp package)

Occasionally, reply.Elem.String() will return truncated output:

"# Server\r\nredis_version:2.5.10\r\nredis_git_sha1:ac2febdb\r\nredis_git_dirty:0\r\nos:Linux 3.2.0-24-virtual x86_64\r\narch_bits:64\r\nmultiplexing_api:epoll\r\ngcc_version:4.6.3\r\nprocess_id:776\r\nrun_id:bdf2888b2974bccff9db6eb473abeb2ff2589d54\r\ntcp_port:10030\r\nuptime_in_seconds:14110158\r\nuptime_in_days:163\r\nlru_clock:1572223\r\n\r\n# Clients\r\nconnected_clients:5\r\nclient_longest_output_list:0\r\nclient_biggest_input_buf:0\r\nblocked_clients:0\r\n\r\n# Memory\r\nused_memory:941320\r\nused_memory_human:919.26K\r\nused_memory_rss:6828032\r\nused_memory_peak:104915264\r\nused_memory_peak_human:100.05M\r\nused_memory_lua:30720\r\nmem_fragmentation_ratio:7.25\r\nmem_allocator:jemalloc-3.0.0\r\n\r\n# Persistence\r\nloading:0\r\nrdb_changes_since_last_save:75038\r\nrdb_bgsave_in_progress:0\r\nrdb_last_save_time:1357899518\r\nrdb_last_bgsave_status:ok\r\nrdb_last_bgsave_time_sec:0\r\nrdb_current_bgsave_time_sec:-1\r\naof_enabled:0\r\naof_rewrite_in_progress:0\r\naof_rewrite_scheduled:0\r\naof_last_rewrite_time_sec:-1\r\naof_current_rewrite_time_sec:-1\r\n\r\n# Stats\r\ntotal_connections_received:440713\r\ntotal_commands_processed:15689002680\r\ninstantaneous_ops_per_sec:13878\r\nrejected_connections:0\r\nexpired_keys:0\r\nevicted_keys:0\r\nkeyspace_hits:2\r\nkeyspace_misses:95626\r\npubsub_channels:0\r\npubsub_patterns:0\r\nlatest_fork_usec:2982\r\n\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\n\r\n# CPU\r\nused_cpu_sys:53159.38\r\nused_cpu_user:92844.89\r\nused_cpu_sys_children:828.06\r\nused_cpu_user_children:1923.70\r\n\r\n# Keyspace\r\n"

This happens using both exp and regular redis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions