gary clark wrote:
Much appreciated on the quick response.
It fails by writing a large string at the server side and not receiving any data at the client. The client uses open-ssl and is blocking to receive data. I dont know if its possible to determine if the write was successful or not on the server side i.e knowing how many bytes were written etc. I dont see any exceptions. The connection is still maintained and like I said its intermittent. So when a transport.write occurs is there an api I can use to see if it was successful?
I'm trying to isolate if its a server problem or a client issue at the moment.
Most platforms' socket APIs don't provide a convenient (or necessarily any) way to see how much data has been ACKed by the peer (which I assume is what you mean by “if the write was successful”). So Twisted doesn't have any API for reporting that to you either. The usual way to observe how much data was sent is to run tcpdump (or wireshark or simliar). Similarly to observe how much data is received run tcpdump on the receiver. If there's a discrepancy then something between those two points is losing your data. Intermittent failures involving large writes may be a PMTU issue on your network. Try reducing the MTU value on your router(s) perhaps. -Andrew.