Alex,
> So, each instance of the handler agrees to handle any connection that comes
> along. Now, after anywhere from days to weeks of uptime, we see this in the
> log (the first line happens once, the rest repeat every few seconds:
>
> ERR [c456a1] [20130824-10:05:48.001] akka: Dead letter from Actor[akka://
>> myThing/user/IO-HTTP/listener-0/2172] to Actor[akka://myThing/system/IO-TCP/selectors/$a/2173]!
>> Close
>> WAR [c456a1] [20130824-10:06:08.202]
>> akka://myThing/user/IO-HTTP/listener-0/2177: Configured registration
>> timeout of 1 second expired, stopping
>> WAR [c456a1] [20130824-10:06:10.998] akka://myThing/user/IO-HTTP/listener-0/2178:
>> Configured registration timeout of 1 second expired, stopping
>> WAR [c456a1] [20130824-10:06:26.897] akka://myThing/user/IO-HTTP/listener-0/2182:
>> Configured registration timeout of 1 second expired, stopping
>> WAR [c456a1] [20130824-10:07:19.998] akka://myThing/user/IO-HTTP/listener-0/2183:
>> Configured registration timeout of 1 second expired, stopping
>> WAR [c456a1] [20130824-10:07:27.097] akka://myThing/user/IO-HTTP/listener-0/2185:
>> Configured registration timeout of 1 second expired, stopping
>> WAR [c456a1] [20130824-10:07:35.098] akka://myThing/user/IO-HTTP/listener-0/2186:
>> Configured registration timeout of 1 second expired, stopping
The dead letter you are seeing might be nothing that you have to worry about.
All it shows is that the HTTP-level ServerConnection actor is telling the IO-level connection actor to close the connection.
If the UI-level connection actor has already terminated itself because the client closed the connection this dead letter can be expected.
The "Configured registration timeout of 1 second expired, stopping" warning from the HTTP-level ServerConnection actors tell you that, for some reason, they are not receiving the `Http.Register` message.
> So, the first question is, are we doing it wrong? :)
With using router as handler you are basically using a "sharded" singleton handler, i.e. each routee will receive the messages from several connections (rather than having one handler actor per HTTP connection). The difference to using a simple singleton actor as handler is simply that the work can be split across several threads. However, what's the purpose of using a "large" number (like > 1000) routees here?
On first glance it doesn't seem valuable to run more routees than cores, no?
> … is this error a simple indication of our servers being asked
> to handle more than 1234 concurrent requests?
No. Your setup should easily be able to handle 10K request (and much more).
Can you rule out that your handler router (or a significant subset of all routees) simply become unresponsive to `Connected` events?
Cheers,
Mathias
---
mat...@spray.io
http://spray.io