Comment From: mrsanvicente

Hello everyone,

Have you faced the error: Could not connect to Redis at 127.0.0.1:6379: Cannot assign requested address

Can redis be fine tuned? the number of request is below the performance test, Is there a way to load balance or increase the performance?

Thank you for your inputs.

Comment From: sundb

@mrsanvicente can you give more details? are you sure you can't connect to redis due to performance issues? please provide slow log, INFO ALL, etc.

Comment From: mrsanvicente

Hello, I am running and script/app that query /get redis. I think that arounds 10,000 gets i get this error and when the load decreases it get s back to work. I have Enough ram and cpus. all query are done locally 127.0.0.1:6379. There is no other load, like other sets or synch.

while the high load and can not do a get or info. just get: Could not connect to Redis at 127.0.0.1:6379: Cannot assign requested address

I am still using Centos 7. no sure what is missing to tune up. i increased the somaxconn at network level and tcp backlog at redis.

more /proc/sys/net/core/somaxconn sysctl -w net.core.somaxconn=1024 /etc/redis/redis.conf tcp-backlog 65536

running the benchmak i get this 63869.20 requests per second ( what if i am hitting this request on highload?

Summary: throughput summary: 63869.20 requests per second latency summary (msec): avg min p50 p95 p99 max 0.422 0.112 0.399 0.535 0.767 4.951

I was thinking to run multiple redis instances and do load balancing.
Any suggestion? Thank you

Comment From: sundb

multiple instance are used for cluster, but i don't think your case is related to high load. can you share the log of Redis and the output of INFO ALL.

Comment From: mrsanvicente

Sure. here you go. redis.11.oct.2024.log info_all.txt

Thanks

Comment From: sundb

@mrsanvicente from the log I think it doesn't relate to the load, if the load is high just connection timeout, not Cannot assign requested address error. can you use telnet 127.0.0.1 6379 or connect the Redis from another server to see if it connects?

Comment From: mrsanvicente

Right now, i do connect, but the issue is not present now.

[root@localhost redis]# telnet 127.0.0.1 6379 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'.

Do you think we have a limitation of ports or concurrent conections?

Comment From: sundb

@mrsanvicente i guess it's related to the limitation of ports.

Comment From: mrsanvicente

not sure if this command will help ulimit -u unlimited i will be monitoring during the issue, and get back

Thanks