-
Notifications
You must be signed in to change notification settings - Fork 58
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
set OMG.State GenServer timeout to 10s #1517
Conversation
I didn't find any data that would imply increasing timeouts would resolve an issue. Can you point me to logs? What is the issue we're addressing? The problem with logs is that the excessive water you're pouring into a glass needs to go somewhere. In our case, State is responsible for handling a bunch of Ethereum event handlers and if someone is waiting for a synchronous response for N amount of seconds that is blocking other processes. |
Here's the original issue The problem is that there are 2 different timeouts involved and they're not in sync. The call chain is:
In this case, I think the 10 minute timeout is soaking it up 😄 That 5 second timeout wasn't a deliberate choice - it just happens to be the default for a GenServer call. The problem is that it's the bottleneck right now. The idea is to remove it and see where the next bottleneck is. In any case, we really shouldn't tell the client that a tx has failed when it has in fact succeeded. I believe that in a future implementation of the childchain we can solve this with an asynchronous api, but I don't think that will happen in this version. |
Maybe I'm reading this incorrectly but looking at the code, that doesn't seem to be the case. OMG.State exec goes like this:
RocksDB
Reading from DB has a 5 second timeout. |
This is absolutely true. But with the current design of a large singleton OMG State, there's no way around this. Childchain solves this, hopefully. :P @achiurizo |
Ah, you're right @InoMurko - I was getting mixed up with a separate issue where I was seeing the But then I don't understand why the tx would actually get submitted - unless the entire OMG.State exec call takes more than 5 seconds, but not just the It has to update the DB with the new tx as well, but it looks like it doesn't wait for that to complete |
Entirely possible. There are around 10 processes that call State on the same interval (8seconds) they're all doing synchronous calls and they might be eating away these 5 seconds. |
After further testing I've realised that this error happens when a tx is submitted at the same time that a block is being formed. If a combination of Increasing the timeout does solve the problem right now, as it allows more time for the block to be formed, although if forming a block takes longer than 10 seconds then we'll get the error again. But if that happens, then we've probably got bigger problems. I think it's fine as a quick fix - we can solve it properly in another version of the childchain What do you think? @InoMurko @achiurizo |
wanna check the status of this PR, is this a still going-to-🛳 PR? |
This reverts commit 522fb32.
Overview
Increasing GenServer timeouts for
OMG.State
per conversation with @kevsul. Concern is that the current timeout on the GenServer is too low(default 5sec) so increasing this will help with the testing.Changes
Increases timeouts to 10sec for
OMG.State
GenserverTesting
N/A