[erlang-questions] Poll: How do you handle spurious messages?
Wed Aug 6 17:07:15 CEST 2014
It's pretty much a strictness question, as well as depending on the
nature of the process; with ephemeral, short-lived processes in an
environment that has many of such, unexpected messages are more likely
to arrive simply because there's more PID recycling going around.
For the most part is harmless; depending on how much do you expect a
process to receive those messages, you might choose different logging
levels according to the rareness of the event. They might be good for
diagnostic purposes -- not as much as diagnosing issues on the
*receiver* but mainly issues on the *sender* - "why is it sending
messages to the wrong process, and why? And what could be the consequences?"
On 06/08/14 15:55, Peer Stritzinger wrote:
> I'm interested in how you deal with spurious messages to your servers
> ... your important messages here ...
> Any -> ??? % we don't want crud to acrete in the
> Or in gen_server speak: what goes into your catchall
> handle_info(_Info, State) -> ???
> Do you:
> 1. log the messages
> 1a.) as info
> 1b.) as warning
> 1c.) as error
> 2. count them e.g. with folsom or similar -> then what do you do with
> the counts?
> 3. Ignore them without trace?
> 4. Crash the server (gasp)?
> Did I forget something?
> -- Peer
> erlang-questions mailing list
PGP: 0x35CB8191 / 1968 5252 3901 B40F ED8A D67A 9330 79B1 35CB 8191
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 455 bytes
Desc: OpenPGP digital signature
More information about the erlang-questions