What is this and what to do about it? (For dummies please)
A little more info might be useful? what are you trying to do? is this plain ole Elixir? Phoenix? Nerves? What deps? What is your end goal?
:mnesia is an OTP application. You can read about it here
Well I guess the title is enough. Using Mnesia, I am getting this warning. No dependencies, On a freebsd machine.
Without seeing any code my Google searches are as good as anyone else’s but I found this Which seems to cover most cases of those error happening.
Seems to me like too many writes from too many processes. (More than 100 specifically if the defaults haven’t changed since 2008)
Thank you. I have reached to the same page.
You can (and probably should) use sync transactions as mentioned in the linked blog post. And it may be worth playing around with the dump threshold settings but in general the overload event means your system is doing more than it is capable of. If these events keep coming you need to have more resources. If the overload is just temporary it is fine. (I.e a short burst of writes coming in).
That said, one thing that helps with performance is to limit the number of concurrent writers. In my experience having 1 writer per scheduler seems to work pretty well. I think I picked this up from a talk from WhatsApp but can’t remember
You can also subscribe to the
overloaded event and try to be proactive by using a circuit breaker of some sort (https://github.com/jlouis/fuse for example). If you run mnesia in a distributed setting this may be a bit harder.
One talk that that briefly mentions this is
Mnesia for the CAPper (http://www.erlang-factory.com/conference/London2010/speakers/ulfwiger) (I’m sure there is a video somewhere as well). This talk also contains a few other things that is good to know about mnesia.
Do you think using poolboy is a good option for pooling mnesia transaction writes?