ERR invalid expire time in psetex
from time to time have error StackExchange.Redis.RedisServerException width ERR invalid expire time in psetex. I use a version 2.5.43 on netStandard 2.0 on redis server 6.2.6, after restart IIS service no error....
What was the error? Please always post the error message when filing an issue anywhere - the devs created them to help you debug :)
Hello error message is 'ERR invalid expire time in psetex', log trace:
à StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor1 processor, ServerEndPoint server) à StackExchange.Redis.RedisBase.ExecuteSync[T](Message message, ResultProcessor1 processor, ServerEndPoint server)
This is like pulling teeth, please post the entire error message, not part of the trace.
It looks like you're calling the method with an invalid expiry argument, but actual details would help.
I have not other message, I not example of data at this time
The best advice I have is look for the caller that's calling this set, it appears to be sending an invalid expiration value to the server, but I don't know the range offhand. My guess is it's passing 0.
I added a log for more details, I'll get back to you as soon as I have news
@Shad107, that error is a RedisServer error, you are either passing in a negative value or a value that's slightly overflown a 64-bit signed integer to the PSETEX command. My money's on Negative because I don't think Timespans can be constructed from integers large enough to overflow.
@Shad107 any luck here?
Not much info to add here, but we all of a sudden saw the same error:
{"type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","title":"ERR invalid expire time in 'setex' command","status":500,"detail":" at Foundatio.Caching.HybridCacheClient.SetAsync[T](String key, T value, Nullable
1 expiresIn) in /_/src/Foundatio/Caching/HybridCacheClient.cs:line 146\n at MyWork.Providers.Cache.Redis.BaseCrossTenantsRedisHybridCacheProvider.Set[TItem](String key, TItem value, Nullable1 expirationTime) in /home/runner/work/cloud/cloud/common/MyWORK.Common/Providers/Cache/Redis/BaseCr
@gdoron I'm not sure what that is but...doesn't appear to be our library?
We are using Foundatio (an amazing library BTW if you are not familiar, I highly recommend checking it) on top of redis stack exchange.
It is still very hard for us to comment without knowing what's actually going through our library. What value did you supply as expirationTime? in particular, is there any chance it is zero, negative, or very very large? that error comes from the server here, I think from this location (although there are others).
If you're passing a reasonable non-zero, non-negative value, then it becomes more interesting, but since I'm pretty sure we've exercised this path ourselves a lot of times, I would be suspicious that the cause is in the bit we don't know, i.e. Foundatio; in which case: "ask them"?
I'm dumb. Indeed something in our CI configuration changed that sent expiration time of 0. Sorry for bothering you Marc :( , and you surely helped me find the root cause here <3