-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No buffer space available, write errror #55
Comments
Have you tried using |
Hi @santigimeno, I'm not able to change the functionality of the app producing messages, which is written in Rust. The app producing the messages only asks for the type of transport (unix_dgram) and the location of the socket (/tmp/demo.socket). The only side I have control of is creating the socket w/ From my understanding, the |
"No buffer space available" corresponds to If your producer sends data at a higher rate than the consumer can receive it, you'll hit that error sooner or later. The solution is to back off for a bit and retry. Tuning SO_SNDBUF and SO_RCVBUF can make it less worse but that's not really a fix, more of a mitigation. (Not that node-unix-dgram currently supports tuning SO_RCVBUF but that can be added if needed.) |
That sounds like a nice feature to have! Just to provide some metrics and I'm currently seeing these stats:
The numbers aren't astronomical, but it's roughly 1.45% of all messages. The timespan of this is less than one minute. The producer application is sending at theses level all throughout the day, but there's a time where the messages being sent drops lower (night time, etc) when there is not a lot of transactions being made. |
I don't have much time to work on it myself right now but if you open a pull request, me or Santiago will review it. |
I'm working on a project that uses unix_dgram. My app sends data to a Unix socket. I'm using
unix_dgram
to create the socket and read the incoming messages. From within node, I don't get any errors from your application, but my producer app that's pushing data on the socket create byunix_dgram
lib complains about there is no buffer space available.I'm pushing a lot of data through this socket, so a lot of the data get through fine, it's only a few messages that don't come out the other end.
Do you know how I can make the buffer size larger within this lib or any methods for me to resolve this issue?
Thanks in advance.
The text was updated successfully, but these errors were encountered: