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

random :erpc, :timeout with partitioned get #202

Closed
benonymus opened this issue May 10, 2023 · 2 comments
Closed

random :erpc, :timeout with partitioned get #202

benonymus opened this issue May 10, 2023 · 2 comments

Comments

@benonymus
Copy link

Hey,

I have the following cache:

  use Nebulex.Cache,
    otp_app: :app,
    adapter: Nebulex.Adapters.Partitioned

I randomly saw this error:

Nebulex.RPCError The RPC operation failed on node :"app@fdaa:0:0000:a9b:80:fdac:28d3:2" with reason:

{:erpc, :timeout}

See :erpc.call/5 for more information about the error reasons.

from here (lib/nebulex/rpc.ex in Nebulex.RPC.rpc_call/6 at line 138):

:erpc.call(node, mod, fun, args, timeout)

Does this mean I should raise the timeout? https://hexdocs.pm/nebulex/getting-started.html#timeout-option

I also saw one of these:

Uncaught exit - {:timeout, {Task.Supervised, :stream, [5000]}}

the same time from another function that uses get from nebulex.

It was a one off not around deployment or any scaling.

@cabol
Copy link
Owner

cabol commented May 13, 2023

Hey!

Does this mean I should raise the timeout? https://hexdocs.pm/nebulex/getting-started.html#timeout-option

By default the timeout is 5000 (5 sec), so maybe you should use the :timeout option, but the error may happen anyway because the cache is trying to reach a node to perform the operation and timed out, that may still happen. So I think if this is something you see from time to time, better off handling/rescuing the exception, then, if the reason is {:erpc, :timeout} perhaps you may want to retry, or just ignore it.

I also saw one of these:
Uncaught exit - {:timeout, {Task.Supervised, :stream, [5000]}}

This one looks a bit weird, because :erpc is used for OTP >= 23, otherwise, it uses supervised tasks. May you add the whole stacktrace please?

@benonymus
Copy link
Author

Have not seen this since, so closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants