Skip to content

Reconnect does not work with large data sets #93

@vsespb

Description

@vsespb
use strict;
use warnings;
use Redis;
my $redis = Redis->new(
server => 'localhost:6379',
reconnect=>10,
every => 100_000,
cnx_timeout   => 10,
read_timeout  => 3,
write_timeout => 3,
#on_connect => sub { while ($_[0]->info("persistence")->{loading}) {sleep 1 } }
);

for (1..100_000) { # adjust me
  $redis->set("test_$_", "x" x 10_000);
}

print STDERR "Please restart redis\n";

while () {
  $redis->get("test_1");
  sleep 1;
}


crashes with
Error while reading from Redis server: at /usr/local/share/perl/5.14.2/Redis.pm line 267.
or
[get] LOADING Redis is loading the dataset in memory, at /usr/local/share/perl/5.14.2/Redis.pm line 267.

does not work even if I uncomment on_conenect callback. possible intermittent issue.

related: shogo82148/Redis-Fast#19

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions