You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using symfony/lock's RedisStore with a predis Client, can randomly throw a Predis\Response\ServerException with the message NOSCRIPT No matching script. Please use EVAL. when trying to create a lock.
I haven't been able to reproduce it consistently, as it seems it can sometimes get solved by restarting the redis server.
This didn't happen with v7.2.0, only with v7.2.3, and by looking at the diff, I see things are being handled differently for this particular error, so I guess those changes are related.
This PR was merged into the 7.2 branch.
Discussion
----------
[Lock] Fix Predis error handling
| Q | A
| ------------- | ---
| Branch? | 7.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix#59686
| License | MIT
#59348 completely broke the Redis store when used with a service, eg:
```yaml
framework:
lock:
resources:
default: snc_redis.default
```
The assumption that `exceptions` is always `false` is only correct when a DSN is used.
Commits
-------
b20892f [Lock] Fix Predis error handling
Symfony version(s) affected
7.2.3
Description
Using
symfony/lock
'sRedisStore
with a predis Client, can randomly throw aPredis\Response\ServerException
with the messageNOSCRIPT No matching script. Please use EVAL.
when trying to create a lock.I haven't been able to reproduce it consistently, as it seems it can sometimes get solved by restarting the redis server.
This didn't happen with v7.2.0, only with v7.2.3, and by looking at the diff, I see things are being handled differently for this particular error, so I guess those changes are related.
How to reproduce
Create a folder with the following files:
docker-compose.yml
composer.json
index.php
Then run the following commands:
docker compose up -d
composer install
php index.php
You will see the following error:
If you update the
composer.json
like thisThen run
composer update
and thenphp index.php
, you'll experience no such error.Possible Solution
Downgrading to
symfony/lock
7.2.0 seems to work around the issue for nowAdditional Context
For context, this was first reported here shlinkio/shlink#2350
The text was updated successfully, but these errors were encountered: