redis - max value for session timeout

103 views
Skip to first unread message

krishna prasad

unread,
Jun 7, 2018, 1:41:24 AM6/7/18
to Redis DB
Hi All,

I am using Brocaar LoRa server for one of my requirement.

Broccar is using below redis command  to set the session timeout.

What will be the maximum value which can be provided to this command?

Thanks and Regards,
Krishna

Itamar Haber

unread,
Jun 7, 2018, 4:57:19 AM6/7/18
to Redis DB
Hello Krishna,

The maximum value that you can set with PEXPIRE is 9223372036854775807 milliseconds (or, in humane terms, the maximal value of a signed long long).

Cheers,

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.



--

Itamar Haber
Technicalist Evangenly

Phone: +972.54.567.9692

Redis Labs


hva...@gmail.com

unread,
Jun 7, 2018, 5:23:27 AM6/7/18
to Redis DB
Hi Itamar,

Discussions on this list in the past have suggested that the precision limits for integer scores described in https://redis.io/commands/zadd are applicable to all integer values in Redis.  I.e., +/- 2^^53, or +/- 9007199254740992.  Is this the case?



On Thursday, June 7, 2018 at 1:57:19 AM UTC-7, Itamar Haber wrote:
Hello Krishna,

The maximum value that you can set with PEXPIRE is 9223372036854775807 milliseconds (or, in humane terms, the maximal value of a signed long long).

Cheers,
On Thu, Jun 7, 2018 at 4:15 AM, krishna prasad <krish...@gmail.com> wrote:
Hi All,

I am using Brocaar LoRa server for one of my requirement.

Broccar is using below redis command  to set the session timeout.

What will be the maximum value which can be provided to this command?

Thanks and Regards,
Krishna

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.

To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.

Itamar Haber

unread,
Jun 7, 2018, 5:32:16 AM6/7/18
to Redis DB
I'm not certain that this is the case, and both src and the cli seem to support this:

127.0.0.1:6379> pexpire a 9223372036854775807
(integer) 1
127.0.0.1:6379> pexpire a 9223372036854775808
(error) ERR value is not an integer or out of range

The 53-bit integer precision, afaik, applies only to the scores of elements in a sorted set as these are stored as doubles (IEEE 754 floating points).

To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.

To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.

hva...@gmail.com

unread,
Jun 7, 2018, 6:01:30 AM6/7/18
to Redis DB
Thanks.  Searching the archived threads, I see I misunderstood those previous discussions.  The IEEE 754 precision limit is only for scores in sorted sets, not other integer values.
Reply all
Reply to author
Forward
0 new messages