magro / memcached-session-manager

A tomcat session manager that backups sessions in memcached and pulls them from there if asked for unknown sessions
Apache License 2.0
758 stars 348 forks source link

REDIS - ERR invalid expire time in setex #402

Open p64 opened 5 years ago

p64 commented 5 years ago

Howdy. I realize this is probably not technically a bug. However I came across it so I thought I'd share with the group. I came across a developer that included their own "web.xml" so the standard one was being overridden. The config was as follows:

`

5256000
   </session-config>`

Yes, that's 5.2 million MINUTES. Which of course got turned into a redis expiration and resulted in "ERR invalid expire time in setex". Perhaps an upper bound check on to avoid this type of overflow problem during the computation.

the redis monitor looked like this:

1549412619.120275 [0 172.31.2.236:57752] "SETEX" "QA_D19DC3924E8DAD0AA229180EEEC8F5C2" "-2114834677" "<snip>"

Hours of my life I'll never get back. But hopefully someone else will. :)