ourway

ourway

** WARNING ** Mnesia is overloaded: {:dump_log, :write_threshold}

What is this and what to do about it? (For dummies please)

Most Liked

ConnorRigby

ConnorRigby

Nerves Core Team

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)

cmkarlsson

cmkarlsson

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 (GitHub - jlouis/fuse: A Circuit Breaker for Erlang · GitHub 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 (Erlang Factory - Ulf Wiger, Uber Erlang programmer and CTO of Erlang Solutions) (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.

Where Next?

Popular in Questions Top

chokchit
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2733ms. You can configure how long re...
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
mgjohns61585
Could someone help me? I’m making my first elixir program, number guessing game. I can’t figure out how to convert the user’s guess from ...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement