e = eredis_new();
eredis_timeout( e, 200 );
eredis_r_max( e, 50 );
eredis_r_retry( e, 1 );
eredis_host_add( e, "127.0.0.1", 6379 );
eredis_pc_cmd( e, "AUTH passwd" );
eredis_pc_cmd( e, "SELECT 1");
eredis_run_thr( e );
eredis_w_cmd( e, "SET testkey 10" );
With this snippet (I trimmed variable declarations, by the way) I am able to connect redis-server as I checked via connection tools and also by redis itself. However, testkey
does not SET. The most interesting thing is, sometimes (randomly) I see that this teskey declared successfully without reason. Like redis get the key but do some delay. However, this is not simply a delay. It happens randomly. After few minutes maybe that key will be set.
Is there any reason to have such behavior on my end? Redis server is v4.