Skip to content
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

Ran out of free wasm instances, when using runtime_api #6436

Open
2 tasks done
seunlanlege opened this issue Nov 11, 2024 · 6 comments
Open
2 tasks done

Ran out of free wasm instances, when using runtime_api #6436

seunlanlege opened this issue Nov 11, 2024 · 6 comments
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.

Comments

@seunlanlege
Copy link
Contributor

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

In the Hyperbridge node, we provide an RPC for querying ISMP events which calls into the runtime using the runtime api.

https://github.com/polytope-labs/hyperbridge/blob/main/modules/ismp/pallets/rpc/src/lib.rs#L423

The problem is if this RPC gets called with a very large block range or perhaps too frequently, users start to observe the following error:

IMAGE 2024-11-11 10:51:39 AM

Which eventually causes the node to fall out of sync.

Steps to reproduce

No response

@seunlanlege seunlanlege added I10-unconfirmed Issue might be valid, but it's not yet known. I2-bug The node fails to follow expected behavior. labels Nov 11, 2024
@tmpolaczyk
Copy link
Contributor

I believe this is harmless, as a new instance will be allocated anyway. See here, maybe someone more familiar with the code can confirm.

let mut instance = self.module.new_instance()?;

Not sure why the warning exists, can it be removed?

@seunlanlege
Copy link
Contributor Author

I believe this is harmless, as a new instance will be allocated anyway. See here, maybe someone more familiar with the code can confirm.

My question is why does it stall block syncing?

@bkchr
Copy link
Member

bkchr commented Nov 12, 2024

Does it really stall or is it just extremely slow? Tell them to set --max-runtime-instances 32 and see if that helps.

@bkchr
Copy link
Member

bkchr commented Nov 12, 2024

paritytech/substrate#8846 generally this would prevent this by having some priority based cache for consensus related actions.

@seunlanlege
Copy link
Contributor Author

Does it really stall or is it just extremely slow?

It actually stalls, from the attached image. Its syncing at 0.0bps, while serving a lot of rpc requests

@bkchr
Copy link
Member

bkchr commented Nov 12, 2024

Can you please ask them to run with -lsync=trace and post the logs when it stalls?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.
Projects
None yet
Development

No branches or pull requests

3 participants