-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReplyError: NOSCRIPT No matching script. Please use EVAL. #25
Comments
@mcollina bummer I have not seen that one before. |
@hmalphettes I cannot reproduce anymore. The moment I run the unit tests of this everything started passing, and I do not know why. I also have a situation where if I run my application, I'll see if I can make a reproducible script that make this usable for me. I hoped you had an idea :(. |
I got the same error when experimenting with what happens when the redis-server is restarted. This implicitly flushes the script cache, requiring it to be reloaded. Note that IoRedis handles it when using defineCommand(), since instead of manually loading the script, it always run |
I had the same issue and spent quite some time to find a workaround. This problem arises, as mentioned by others here, after a redis restart. Here's something that works: const redisdown = require('redisdown')
const level = require('levelup')
const redis = require('redis')
const redisClient = redis.createClient()
const myThing = level('foo', {db: redisdown, redis: redisClient})
const scriptsloader = require('redisdown/scriptsloader')
redisClient.on('ready', () =>
myThing.open(() =>
scriptsloader.preload(redisClient, () => {})
)
) An alternative to this is, as mentioned, to use ioredis instead of node-redis. As simple as: const redisdown = require('redisdown')
const level = require('levelup')
const Redis = require('ioredis')
const redisClient = Redis(opts)
const myThing = level('foo', {db: redisdown, redis: redisClient, valueEncoding: 'json'}) |
Exception with:
Anybody has any clue on how to debug this?
The text was updated successfully, but these errors were encountered: