5

I'm running into a really weird issue where a browser's HTTP requests appear to be discarded by the Simple connector used by a Restlet server.

Server setup:

  • Restlet 2.1.2 server
  • Restlet-Simple extension (comes with Simple 4.1.21)
  • Restlet-crypto extension for digest authentication

The server is serving web pages to browsers and uses javascript's XMLHttpRequest to fetch updates. Some of these XMLHttpRequests don't complete though. The javascript debugger for Chrome shows the "failed" status for these; Firefox's debugger logs a completion time without an HTTP status code and recorded response. A packet sniffer indicates that the problematic requests are actually send to the server, but the server never responds. Debugging shows that these requests never reach our server code.

I have verified the problem with Firefox, Chrome as well as IE. All three browsers (latest versions) run into this problem. Also, each browsers is repeatedly and reproducably having problems with the exact same requests. This set of requests differs between the three browsers though.

What's really weird is that the problem does surface when using the server's machine name (test runs on a LAN), but not when using the machine's IP-address. Switching back from Digest to Basic authentication makes the problem go away too, as does replacing the Simple connector with Jetty.

I'm inclined to switch to Jetty now, but I'd still like to know what's going on. Has anyone seen such behaviour before, or have an idea about what's going wrong here?

PrimosK
  • 13,848
  • 10
  • 60
  • 78

1 Answers1

0

We recently encountered a similar problem with Restlet, which also resulted in some requests not being completed. The issue was a non-synchronized map access within Restlet, which has already been fixed (https://github.com/restlet/restlet-framework-java/issues/753).

If you see one or multiple threads causing high CPU traffic, this may indicate that you are affected by this problem.

If your XMLHttpRequests come in in parallel you might be affected.

rli
  • 1,745
  • 1
  • 14
  • 25
  • That particular issue would probably result in random failures. In my case, however, the set of requests that are ignored are always reproducably the same. Which set this is varies by browser though. So firefox misses responses to one set of requests, IE to another set and Chrome to yet another set. – Arjohn Kampman Jun 10 '13 at 07:44