Comments (2)
The operating system cannot clean up the ports you use as fast as you are creating new connections. The solution is to not create a new connection for every line, but to reuse the connection (or use a connection pool if you will). In addition to fixing this problem, reusing a connection will also be lots faster.
from hiredis.
1 I use one pc as server an client
2 client may reconnect the server quickly (in different func)
3 so there may TIME_WAIT cased by the connect. I have a quession .The Time_wait state was the kernel handle the
tcp socket close. I use
sysctl -w net.ipv4.tcp_timestamps=1
sysctl -w net.ipv4.tcp_tw_recycle=1 to quickly handle the preblem . But it still have many Time_Wait . Do you have a more faster method ?
from hiredis.
Related Issues (20)
- recv block HOT 1
- Issue with commands not timing out when the server is unresponsive and rate of outgoing traffic is high HOT 5
- libhiredis0.14, httpd, libcjose0 libapache2-mod-auth-openidc HOT 5
- KEYS ERROR IN VERSION 1.1.0 HOT 5
- redisNetWrite crashes application process with Signal: SIGPIPE (Broken pipe) on linux if target socket was closed while sending data
- CMake sets incorrect version for library HOT 1
- SSL callbacks are set even if the SSL initialization fails
- hiredis.c compile error [E0513] in VS2022 HOT 4
- Assessment of the difficulty in porting CPU architecture for hiredis HOT 2
- support REDIS_REPLY_EMPTY_ARRAY as a new return type. HOT 3
- redisCommand crashes on FreeBSD x86 HOT 5
- [warn] epoll_wait: Function not implemented HOT 4
- Wheel for 3.12.x
- Documentation Request: Structure and Order of Replies in Async Context when Subscribe HOT 2
- Coredump at sdscatlen HOT 2
- Problem when sending messages when TLS encrypted connection is used HOT 6
- Speed problem when TLS encrypted connection is used
- unused parameter warning HOT 2
- Program crashes due to Segmentation fault or double free using AsyncCommand (PUBLISH..) HOT 6
- Segmentation fault when hiredisSetAllocators by jemalloc HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hiredis.