Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What can cause a “Resource temporarily unavailable” on sock send() command

What can cause a Resource temporarily unavailable error on a socket send() command? The socket is setup as AF_UNIX, SOCK_STREAM. It works most of the time, but occasionally gets this error. The receiving end of the socket appears to be working properly.

I know this isn't very detailed, but I'm just looking for general ideas. Thanks!

like image 353
giroy Avatar asked Jan 17 '13 00:01

giroy


Video Answer


1 Answers

"Resource temporarily unavailable" is the error message corresponding to EAGAIN, which means that the operation would have blocked but nonblocking operation was requested. For send(), that could be due to any of:

  • explicitly marking the file descriptor as nonblocking with fcntl(); or
  • passing the MSG_DONTWAIT flag to send(); or
  • setting a send timeout with the SO_SNDTIMEO socket option.
like image 175
caf Avatar answered Oct 05 '22 05:10

caf