[erlang-questions] How to see which processes used ets table?

Loïc Hoguin essen@REDACTED
Thu Feb 7 02:50:14 CET 2013


On 02/07/2013 02:31 AM, ok@REDACTED wrote:
> The only alternative I've been able to think of with the
> existing interfaces is to create a watchdog process that
> checks process_info(Target, memory) periodically, which is
> doable, and which can check for message queue growth as well.

This is probably the least insane approach.

A maximum limit on the memory used by a process could certainly prevent 
processes who start using too much because of bugs, but it might also 
have the inverse effect of killing legitimate processes. The chances of 
this happening increase with the number of updates the code receives, as 
you will most likely forget to update it.

There's only one sane approach to make sure a system works as intended 
for any size of inputs over any length of time: testing. And more than 
that, property based testing. If your system crashes because of memory 
issues and you didn't catch it while testing, you might consider writing 
some properties and feeding your application bigger chunks of data over 
longer periods of time.

-- 
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu



More information about the erlang-questions mailing list