New issue 500 by vijeeshk...@gmail.com: connection timeout
http://code.google.com/p/redis/issues/detail?id=500
What version of Redis you are using, in what kind of Operating System?
2.2
What is the problem you are experiencing?
We have a redis server running with our webserver (which is in same LAN)
connects to redis using phpredis module. At normal condition it works fast,
when there are more than 100 connections open on redis port we have found
network timeouts randomly. I have put two scripts on webserver for testing
1. Php script which connect to tcp port 6379 every 10 secs and log when
connection cant establish on 5 secs.
2. php script which connects using predis client and send ping to the redis
server, this also run every 10 secs.
Both scripts timeout almost at same time. There is nothing in the logs. Can
you please provide some steps to pin point the exact issue here?
What steps will reproduce the problem?
Do you have an INFO output? Please past it here.
No
If it is a crash, can you please paste the stack trace that you can find in
the log file or on standard output? This is really useful for us!
Please provide any additional information below.
-Vij
A number of issues can cause this. For instance, Redis is overloaded and
cannot server newly connected clients at that moment (which is why the INFO
output is helpful here). It might as well be a PHP issue, or an issue
related to your network configuration (is the Redis host itself
reachable?). Another cause might be: Redis is configured with a very low
timeout, and closes the connections when there is no activity (this needs
to be explicitly configured, the default timeout is 300s), although
disconnecting timed out clients shows up in the log.
Thanks. redis server itself is reachable it seems.
Can you give me some troubleshooting steps? Can we set the loglevel to
debug on the fly?
We are using the default timeout only, and every script is opening new
connection sending commands and then closing it.
-Vij
Also, we are sending only 100s of requests per sec..not more. As per redis
docs server ready to handle more than 100k's of rquests
-vij
I have tried to run tcpdump to log the packet, when the connections were
dropped, server didnt send ack to the client. There is nothing else in the
dump file.
What may be the reason? Will it be in Linux side or in redis itself.
Thanks for your help
-Vij
Tried to log the number of tcp connections on port 6379 every minute, and
when the issue happens always the connection count is more than 100
At normal times its less than 10
-Vij
Maybe the PHP process is running out of file descriptors. Could you check
the fd limit for both the processes running Redis and PHP (ulimit -n)?
hmm..yea it is set to 1024 .. i am logging the total number of redis
connections
every minute and it looks like there were instances when there are 700+
open connections(using netstat) . I think it had hit the 1000 limits and
passed these errors.
I have set the timeout value to 300, in my scripts am not using same
connections for multiple operations. Value to 30 will be fine in that case?
-Vij
Looks like issue is not due to the filedescriptior, i have logged number of
open files every 10 secs and it never reached limit of 1025
Can you please help me to find out what is the issue? I have tried to
analyze the tcpdump and found packets are not lost in network, server just
didnt sent ack for the new requests when issue happened. Please let me know
if u need more info ,
Thanks
-Vij
issue happens when the there are more than 100 established connections to
the redis server
redis_version:2.2.0
redis_git_sha1:00000000
redis_git_dirty:0
arch_bits:64
multiplexing_api:epoll
process_id:24829
uptime_in_seconds:249837
uptime_in_days:2
lru_clock:142324
used_cpu_sys:9589.27
used_cpu_user:2645.72
used_cpu_sys_childrens:731.97
used_cpu_user_childrens:134.06
connected_clients:1
connected_slaves:1
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
used_memory:2235368128
used_memory_human:2.08G
used_memory_rss:3167801344
mem_fragmentation_ratio:1.42
use_tcmalloc:0
loading:0
aof_enabled:0
changes_since_last_save:2241
bgsave_in_progress:0
last_save_time:1301657468
bgrewriteaof_in_progress:0
total_connections_received:13739616
total_commands_processed:89080005
expired_keys:0
evicted_keys:0
keyspace_hits:70052629
keyspace_misses:5922576
hash_max_zipmap_entries:64
hash_max_zipmap_value:512
pubsub_channels:0
pubsub_patterns:0
vm_enabled:0
role:master
here is redis info o/p
we experience the same issue - with 2.4.6 redis
we also experience this problem. Our PHP application report
some "connection timeout" error.
The redis version is 2.4.10. Installed on Ubuntu 11.10 (oneiric) with 1.7Gb
of RAM. CPU load average is very low and there still plenty of free RAM.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.Visit this group at http://groups.google.com/group/redis-db?hl=en.For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.