Open potsky opened 9 months ago
Hello @Frzk,
I'm sorry to put the pressure on you, but our Scalingo app is a disaster. We're losing a lot of jobs, contract signatures aren't synchronized with YouSign, meter synchronization with Enedis and GRDF isn't working, and things are getting very, very tense on our side.
How can I rollback phpredis very quickly? Do you have any ideas? How can we help?
Hello @potsky, I'm very sorry to read that :-( Until we can come up with a cleaner solution, I suggest you to try the following (not tested yet):
bin/compile
file and comment lines 296 and 297 (which install our phpredis default version)composer.json
file and add the following line in your require
section:
"ext-redis": "5.3.7",
composer.lock
filescalingo --app <my-app> env-set BUILDPACK_URL="<buildpack_url>"
(please replace <my-app>
with the actual name of your app and <buildpack_url>
with the URL to your forked and edited buildpack).
I'm currently testing this solution. Also please don't hesitate to ask our support operators to talk to me if need be.
After testing, it seems it's a bit more complicated. Here is the full procedure:
bin/compile
file and comment lines 296 and 297 (which install our phpredis default version)lib/composer
file and comment line 125. Just below add the following line:
package_found="false"
conf/buildpack.conf
file and set the phpredis_version
variable to 5.3.7
. composer.json
file and add the following line in your require
section:
"ext-redis": "5.3.7",
composer.lock
filescalingo --app <my-app> env-set BUILDPACK_URL="<buildpack_url>"
(please replace <my-app>
with the actual name of your app and <buildpack_url>
with the URL to your forked and edited buildpack).
scalingo --app <my-app> deployment-delete-cache
Thank you @Frzk ❤️
We have followed your guide (just replaced our buildpack in our .buildpack
file, we have APT and NodeJS too).
The correct version seems to be installed in the deploy: Installing PECL extension redis version 5.3.7
But an error occurs several lines below when downloading sodium extension:
Installing PECL extension redis version 5.3.7
PHP extension simplexml is embedded in runtime
Installing PECL extension sodium version <!DOCTYPE html>
<html lang="en">
<head>
<title>PECL :: Error 404 not found</title>
<link rel="shortcut icon" href="/favicon.ico">
<link rel="alternate" type="application/rss+xml" title="RSS feed" href="https://pecl.php.net/feeds/latest.rss">
<link rel="stylesheet" href="/css/style.css">
</head>
<body >
...
Mmh that's probably linked to the package_found=false
modification in lib/composer
.
I suggest to edit this file (lib/composer
) again, like so:
package_found="$(has_package ...
package_found="false"
lineif [[ "${package_found}" = "true" && ! "${ext}" =~ "redis" ]] ; then
Which would give:
[...]
local extension_package_path="ext/$(php_api_version)/php-${ext}"
package_found="$(has_package "${PHP_BASE_URL}" "${extension_package_path}")"
if [[ "${package_found}" = "true" && ! "${ext}" =~ "redis" ]] ; then
echo "Installing PHP extension: ${ext}" | indent
fetch_package "${PHP_BASE_URL}" "${extension_package_path}" "/app/vendor/php"
else
install_pecl_extension "${ext}" "${ext_version}" "${CACHE_DIR}"
fi
[...]
Thank you @Frzk you rock!
It works as expected, we will push this on production now and check if problem is resolved. I will keep you informed about this version of phpredis in several days.
Thanx!
Great to read that :)
Please note that this is only a workaround. We'll probably update the buildpack in a way that allows users to pin a specific version of the default extensions.
When/If this update becomes available, you'll be able to switch back to the default buildpack.
I'm reopening this issue until we've decided what to do exactly.
I have set a reminder to tell you in a few days if the error has disappeared with 5.3.7 on production.... Keep in touch !
Hi @Frzk !
as promised, I'm back with great news for us: we haven't had a single error with phpredis 5.3.7, whereas we had hundreds of thousands with 6.0.2 in just a few days.
So we're going to stay with 5.3.7 for the time being, and if it's possible to go back to Scalingo buildpack and stop using our fork by being able to specify the extension version in the environment variables, for example, that would be just ideal.
I've opened an issue on https://github.com/phpredis/phpredis/issues/2437 to see if someone has an idea...
Hi !
Since the upgrade from 5.3.7 to 6.0.2 of phpredis on December the 20th, we have a lot of problems of this kind :
Redis::exec(): Send of 463 bytes failed with errno=32 Broken pipe
orRedis server tcp://xxx.redis.dbs.scalingo.com:xx went away
.We have checked with the Scalingo support team the Redis and app logs, we have check our code, the dependencies upgrades... With 5.x everything were working find for years. So we would like to test a previous version of the extension.
So we have forked the PHP buildpack and have replaced the GitHub repository in our app in the
.buildpacks
file. Given than the commit where phpredis has been upgraded from 5.3.7 to 6.0.2 is a little bit more complicated (the variablephpredis_version
did not exist before), we have tested to load the version 6.0.1 in our fork :We have added debug information to check our fork is taken into account. It is correctly loaded when deploying :
Before deploying, we have clear the deploy cache on the dashboard. During deployment, everything is ok, version 6.0.1 is downloaded and used:
But when the deployment is done, phpinfo always tells us that PHP is using version 6.0.2 :-(
Thank you for your answer!