-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deadlock detected #29
Comments
Ok, my issue may not actually be breeze related directly... However, it does worry me that it was so easy to his this error. I'll leave it open for now so we can track it. Maybe someone can think of a fix. |
Ok, just ran in to something similar and I was doing something completely different here:
It seems it's pretty easy to hit DB errors with this. In this case I was calling this code: File.read_lines(filename).each do |domain|
SaveRestrictedDomain.create(text: domain.strip) do |_o, _d|
# ignore if it fails
end
end This code was in a task that I was running locally, and The original post was caused from me running specs where I was essentially doing the same. I was pushing more queries than what could be handled. These are probably edge cases, but the fact that they are preventing me from doing what I need to is an issue. For now, I was able to get around the first part because when I ran specs earlier, it thought I was in development. For this case I am in development, but we have a |
So are you saying that you think it's because we are saving things to the database using breeze/src/breeze/actions/mixins/action_helpers.cr Lines 16 to 25 in 5a98f72
|
That's my assumption, yeah. It seems like It's kicking off more spawns than doing saves, and they are piling up. I guess since it's easy to reproduce, I can take them out of the spawn to see if it still does it. I'll give that a shot tomorrow and see if that makes a difference. |
Here's at least one thing we connect to the current fiber https://github.com/luckyframework/avram/blob/5e29f75371dca5a2bc16858163dc3790cabfbfcb/src/avram/database.cr#L6 |
I'm not too familiar with doing multi-threading stuff. I wonder if that holds us back in some way by restricting to a single thread 🤔 |
I went to run specs on my app locally, and I got a ton of deadlock errors:
I have it set to only enable while in development, so in theory breeze should be skipped during tests... I'll try to dig in more to see what specifically is causing this.
The text was updated successfully, but these errors were encountered: