[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Network write() stalls with 'Resource temporarily unavailable'



Hi all,

I'm trying to communicate with a number of different remote nodes that
may respond slightly slower than my program is trying to send each of
them packets.

The server end of the sequence is basically:

<- Receive connect
-> Ack connect
<- Receive Data Request
-> Ack request
-> Send Data
<- Ack data
-> Send Status
<- Ack status
.
.
.
<- Disc
-> Disc confirm

In the code, I receive the request, decode it, then send the data 
(using write()) followed by the status.

I'm finding that sometimes I'm getting the following:

DBG: DECnet Connect : COMPAQ : FD : 8
DBG: RdPkt : FD : 8 : Size 976/36 : OK        (size = max/actual)
DBG: WrPkt : FD : 8 : Size 108/108 : OK       (size = req/actual)
DBG: WrPkt : FD : 8 : Size 20/-1 : FAIL - Resource temporarily
unavailable

I have potentially a number of these clients connecting and requesting
data, so I don't want to stall waiting for the resource to become
available for that one connection (which appears to coincide with the
data ack from the client for that data block ... if I slow it down a bit
it works!), as I'll then stall the entire server.

Normally, I don't need to send more than one packet back in response to
a request, but occasionally it happens ... more likely for multiple
requests to come in ...

OK, the questions:

(a) Shouldn't I be able to send multiple packets to a client without
waiting for the ack to each packet?

(b) How big is the outbound buffer? Am I actually stalling while the
outbound packet is being sent ?? If so, how do I make the outbound data
buffer bigger, and would that make a difference?

(c) What *exactly* does 'Resource temporarily unavailable' mean in this
context ??!


Thanks,

Rob.
-----------------------------------------------------------------------------
To unsubscribe from this list, send a mail to majordomo@dreamtime.org
containing the line "unsubscribe linux-decnet"
-----------------------------------------------------------------------------