Wednesday, March 16, 2016

ASP.NET RedisSessionStateProvider - ERR unknown command 'EVAL'

After switching to the RedisSessionStateProvider  our ASP.NET application started to fail with the following error message:

ERR unknown command 'EVAL'

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: StackExchange.Redis.RedisServerException: ERR unknown command 'EVAL'

image

On StackOverflow I found that it could be related to an older Redis version as the EVAL command was introduced in Redis 2.6.

A quick check using the INFO command revealed that I was indeed using an older version:

image

After upgrading to a more recent version, the error went away!

No comments: