Version: redis_version:4.0.9, redis-py version = '3.5.3' Platform: What platform / version? (python 3.6.6, Ubuntu 18.04.3 LTS, Amazon EC2)

Description: I am using redis-py to connect to a local redis. There are many different threads and independent process that connects to redis (the number of clients should still be small < 10). At random points, I keep getting connection refused error. "Error 111 connecting to 127.0.0.1:6379. Connection refused." This is not reproducible consistently. Can you please offer any pointers on how to rootcause this ? I've tried many things (including locking before get/put) - but this random error pops up during put and goes away. I use a singleton connection pool and have enough headroom for CPU/memory etc. Some of the connection stats look like below and nothing stands out from what I could see.

Stats total_connections_received:6 total_commands_processed:5380 instantaneous_ops_per_sec:59 total_net_input_bytes:374586707 total_net_output_bytes:139631996 instantaneous_input_kbps:5111.95 instantaneous_output_kbps:6.49 rejected_connections:0 sync_full:0 sync_partial_ok:0 sync_partial_err:0 expired_keys:0 expired_stale_perc:0.00 expired_time_cap_reached_count:0 evicted_keys:0 keyspace_hits:90 keyspace_misses:39 pubsub_channels:0 pubsub_patterns:0 latest_fork_usec:0 migrate_cached_sockets:0 slave_expires_tracked_keys:0 active_defrag_hits:0 active_defrag_misses:0 active_defrag_key_hits:0 active_defrag_key_misses:0

I don't know if this is a client connection specific issue or redis issue (or my code). Posted this on redis-py client library also. So just looking for pointers to debug more.

Comment From: mangleddata

Closing because reinstalling redis, cleaning up all config files don't seem to show the same issue. For removal I used (if someone needs it) sudo apt-get purge --auto-remove redis-server