Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

oom errors fail silently with pipelines #131

Closed
clutchski opened this issue Jul 4, 2015 · 2 comments
Closed

oom errors fail silently with pipelines #131

clutchski opened this issue Jul 4, 2015 · 2 comments
Assignees

Comments

@clutchski
Copy link

When running a redis instance with maxmemory-policy noeviction, redis will return errors for write commands that push memory over the limit.

Either I'm using pipelines incorrectly (possible) or redigo is not returning an error in this case. Here's a (pseudo-code) example:

for _, k := range whatever {
        err := conn.Send("zadd", key, score, member) // assume this pushes memory over the limit
        if err != nil {
                return err
        }
}
 _, err = conn.Do("") // this error should be non-nil, but is

Note, that similar code that uses a transaction with MULTI/EXEC does return the OOM error. You should be able to replicate pretty easily by setting your redis instance to an artifically low memory threshold.

Please let me know if I'm not using pipelines correctly. Thanks.

@garyburd garyburd self-assigned this Jul 13, 2015
@ericlagergren
Copy link

conn.Do is missing something like this:

        if e, ok := r.(Error); ok {
            return nil, c.fatal(e)
        }

@stevenh
Copy link
Collaborator

stevenh commented Feb 28, 2021

I believe this was fixed by #554 please reopen if not

@stevenh stevenh closed this as completed Feb 28, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants