4

I have written an XMPP daemon (using JAXL) for sending and recieving messages which seems to work OK except for one issue.

I can successfully send 10 to 15 messages to the users I want to send to, and then after that any message I send comes back with <message type='error' ...><error code='503' type='cancel'></error></message>

I am using Google's talk servers to send from a Google Apps domain to another Google Apps domain.

Without posting all my code does anyone have any ideas what may be causing this. The bit that puzzles me is that I can send 10 to 15 messages first before it stops.

hakre
  • 193,403
  • 52
  • 435
  • 836
Michael Bates
  • 1,884
  • 2
  • 29
  • 40

1 Answers1

3

Sounds like you are hitting a rate-limiter. From the HTTP spec:

10.5.4 503 Service Unavailable

The server is currently unable to handle the request due to a
temporary overloading or maintenance of the server. The implication
is that this is a temporary condition which will be alleviated after
some delay. If known, the length of the delay MAY be indicated in a
Retry-After header. If no Retry-After is given, the client SHOULD
handle the response as it would for a 500 response.

A well-behaved service, which I would expect most of Google's to be, would be correct in returning such a response if it was rate-limiting something.

Community
  • 1
  • 1
cdeszaq
  • 30,869
  • 25
  • 117
  • 173
  • It may help to ensure your writes are not too "bursty" - slowly building up the volume of requests will often help solve such 503 errors for web services, though I have no particular experience with this one – Daan Mar 05 '12 at 23:34
  • @Daan - Good point. A quick burst may look like the starting of an attack, especially if the service is a bit paranoid. – cdeszaq Mar 05 '12 at 23:40
  • Yeah I think it must be that. I was also sending the same text over and over again, so some spambot or something similar may have been sending the 503's. Once I started changing the text and slowing down the send rate things seemed to be more normal. – Michael Bates Mar 06 '12 at 02:03