TCP errors when connecting to RRS feed

  • Question

  • I've got a C++ application that connects to EWS via the CURL C library.  The code does its own Soap calls, it is not using the Managed API.  I have recently seen a situation where when trying to do a POST to create a message that is about 8 meg, the server eventually shuts down, and my library gives a tcp error 10053 (host shutdown).  CURL tries to reconnect and seems to work for a while, but it doesn't last long, and eventually my program is hosed.  Using the exact same code with a private Exchange 2013 server (over the internet) works just fine.  I know Office 365 has throttling limitations but this doesn't seem to be that, there is no graceful response, just death.  Any ideas about what is going on here?

    Thursday, November 14, 2013 5:05 AM

All replies

  • Its probably not throttling, how long is your upload running for before it fails ? (most importantly is it taking more the 2 minutes ?)

    Is the Mailbox where your creating Message different from the credentials your using. If so its important that you set the

    X-AnchorMailbox header 


    Friday, November 15, 2013 2:10 AM
  • It runs for about 1 minute, more or less.  What is the significance of 2 minutes?

    It turns out I did have some problems with error detection, so the process is not actually dying, I'm just getting that SSL/TCP error 10053 pretty consistently.  I put in some code to have it retry the POST when it happens, and earlier today was getting better results - the second attempt would work about half the time.  As I write this, however, it keeps failing no matter what.  And again, with a non-Microsoft Exchange 2013 server, it works just dandy, so I wonder if there is some issue with your datacenters or communications?

    I am creating the message in the same mailbox that I supply user credentials for.

    Friday, November 15, 2013 5:08 AM
  • In my experience if you have want to upload something say a really large attachment you need to chunk the request, else at the 2 minute mark the firewall will kill the connection. But this only happens for say a 20 Mb attachment over a slow link. If its 8 MB over a good link and under a minute that shouldn't be a problem.

    You can check the Office365 status in the O365 dashboard there are a few twitter aggregations of this . It looks like they had some network problems yesterday, is that when your issue started ?

    SSL/TCP error 10053 isn't much to go on, you might want to try doing a network capture with something like fiddler and see if your getting any more details in the raw responses (if any).


    Friday, November 15, 2013 8:48 AM
  • Thanks, I will try to experiment with a network monitor.  What do you mean by "chunk" the request?  The way CURL works, I do a POST to an url, specifying the size of the data.  Then CURL does callbacks to my routine, where I supply it with 16k blocks of data until it is all done.  I have tried reducing the size of the blocks, and also putting in a delay, to no effect.

    Friday, November 15, 2013 4:49 PM
  • Chunking the request means not using the default WriteStreamBuffering and post the data in chunks rather then a large stream eg I'm not familiar with Curl but that sounds like what is happening although it could be underlying how its doing it may be causing an Endpoint device to drop the connection (at a guess). If you can you may want to use some simple EWS Managed API code and so some side by side testing with your Curl process to see if they both fail.


    Monday, November 18, 2013 5:22 AM