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

Version 3.1.3 Warning: Redis::pipeline(): Already in pipeline mode #1211

Closed
valdislav opened this Issue Jul 19, 2017 · 18 comments

Comments

Projects
None yet
@valdislav
Copy link

valdislav commented Jul 19, 2017

Hi, today library was updated and we got this error.

Expected behaviour

Not throw warnings.

Actual behaviour

Warning: Redis::pipeline(): Already in pipeline mode on every request.

I'm seeing this behaviour on

  • OS: RHEL 6.9
  • Redis: redis-2.8.17-2.el6.x86_64
  • PHP: 7.0.21-1
  • phpredis: php-pecl-redis-3.1.3-1.el6.remi.7.0.x86_64

Steps to reproduce, backtrace or example script

In the middle php library olinmollenhour/cache-backend-redis: 1.9 used
Even simple session save handling fails

I've checked

  • There is no similar issue from other users
  • Issue isn't fixed in develop branch
@michael-grunder

This comment has been minimized.

Copy link
Member

michael-grunder commented Jul 19, 2017

I'll have to check but I think this is a new warning thrown if you try to enter pipeline mode when already in pipeline mode.

Edit: It looks like this is a side effect from updated pipeline processing code.

On the one hand, the warning is correct. Calling pipeline when already in a pipeline could indicate that the application layer was somehow out of sync. On the other hand calling pipeline when already in a pipeline isn't necessarily dangerous and we used to just ignore cases such as that.

In the meantime you can use getMode to determine if you're already in a pipeline before calling it again.

@yatsukhnenko I can see why we might want to revert to a NO OP here as it is what used to happen, but perhaps we leave it open to see how many people are impacted before changing it back.

@remicollet

This comment has been minimized.

Copy link
Contributor

remicollet commented Jul 19, 2017

@valdislav FYI, redis 3.1.3 have been removed from my repository, I recommend you downgrade to 3.1.2, waiting for some update.

@siliconalchemy

This comment has been minimized.

Copy link

siliconalchemy commented Jul 19, 2017

+1 this has just killed production websites for us. Downgrading to 3.1.2 fixed it.

@yatsukhnenko

This comment has been minimized.

Copy link
Member

yatsukhnenko commented Jul 19, 2017

@michael-grunder I've specially added this warning to help users find and fix double pipeline calls because in previous releases this was dangerous.
As for me it is easier to fix this issue by adding check in php code instead of fixing in extension and releasing new version but I don't mind to remove this warning if it will affect many users.

@FadelChafai

This comment has been minimized.

Copy link

FadelChafai commented Jul 25, 2017

You can try to reinstall an older version of pecl/redis ( i had the same issue with Mag 1 )
pecl uninstall redis
pecl install redis-3.1.2

@DerekMarcinyshyn

This comment has been minimized.

Copy link

DerekMarcinyshyn commented Jul 25, 2017

downgrading to redis-3.1.2 fixed it for me.
Magento EE 1.14.x
last night upgraded from php 5.6.30 to php 5.6.31 which seemed to trigger the pipeline warning

@michael-grunder

This comment has been minimized.

Copy link
Member

michael-grunder commented Jul 25, 2017

From my perspective I think that issuing a warning here is more correct as entering pipeline mode twice (or multiple times) could indicate that the PHP client code has lost track of the object state.

That being said, since this is new behavior introduced in 3.1.3 and is causing people pain it's probably best to go ahead and remove it. There is nothing inherently dangerous about treating a duplicate call to pipeline as a NO OP.

I'll reference this issue with the commit.

@valugi

This comment has been minimized.

Copy link

valugi commented Aug 3, 2017

Happens also in version 3.2.9.
On Centos7 with IUS solved by downgrading as well:
yum --enablerepo ius-archive install php70u-pecl-redis-3.1.2

@MikeParkin

This comment has been minimized.

Copy link

MikeParkin commented Aug 4, 2017

This is causing issues in Magento 1.x (warnings) and exceptions in Magento 2.x - lots of users will be affected.

@bartolinho

This comment has been minimized.

Copy link

bartolinho commented Aug 4, 2017

The same problem exists on:
Magento 1.14.2.4
PHP 7.0.21
phpredis 3.1.3
redis 3.2.4
Warning: Redis::pipeline(): Already in pipeline mode in /var/www/magento/lib/Credis/Client.php on line 931

EDIT:
Downgrading to phpredis 3.1.2 fixed the issue

@HOSTED-POWER

This comment has been minimized.

Copy link

HOSTED-POWER commented Aug 11, 2017

Having same issue on Magento 2.x, redis 3.1.2 is working fine.

@michael-grunder

This comment has been minimized.

Copy link
Member

michael-grunder commented Aug 16, 2017

If those affected by this would try with the latest version of the develop branch that would be great.

@nilands55s

This comment has been minimized.

Copy link

nilands55s commented Aug 22, 2017

Ok for me this is not a Redis 3.1. or a php 5.6.31 version problem as my Magento 1.9.3.4 is on Ubuntu-Server 14.04 LTS. Where there is no upgrade beyond PHP 5.5.9 and Redis-server is version 2:2.8.4-2, SO I am not any where near the versions mentioned above and have the same issue.
I am getting the same error as bkibilko stated:

"ERR (3): Warning: Redis::pipeline(): Already in pipeline mode in magento.../Credis/Client.php on line 931"
The offending code is:`
// Multi and pipeline return self for chaining

            if($this->isMulti) {
                call_user_func_array(array($this->redisMulti, $name), $args);
                return $this;
            }`

I have yet to find anything relating to Magento on this and not sure if it is Causing some of the magento
errors I am getting. So since I have no regression to do how do I fix this? It is adding 80-100 MB of errors in my magento system.log every day and no one but "I" am using it yet. Just while writing this it had add another 11 MB of the same error lines.
Can anyone explain the concept of this error? Perhaps just to kill the error messages unitl there is a resolution?

@michael-grunder

This comment has been minimized.

Copy link
Member

michael-grunder commented Aug 22, 2017

Prior to phpredis 3.1.3 if you called pipeline when already in pipeline mode it would just ignore the call. 3.1.3 changed this behavior and started issuing warnings.

$r->pipeline(); // enter pipeline mode
$r->pipeline(); // In <= 3.1.2 call is ignored, in 3.1.3 it issues a warning

This should be fixed in the latest develop branch however.

@valdislav

This comment has been minimized.

Copy link

valdislav commented Aug 30, 2017

@michael-grunder
So magento2 use old version of credis library "colinmollenhour/cache-backend-redis": "1.6", fixed from 1.7:
colinmollenhour/credis@74b2b70

@ewasser

This comment has been minimized.

Copy link

ewasser commented Sep 5, 2017

Please change this behavior and omit the warning.

The warning will break live magento shops without any warning for the maintainer. Upgrading a magento shop to remove the multiple $r->pipeline() calls can be extremly complicated.

@yatsukhnenko

This comment has been minimized.

Copy link
Member

yatsukhnenko commented Sep 5, 2017

3.1.4RC1 with fix of this issue is up on PECL as beta (stable next month)

@yatsukhnenko

This comment has been minimized.

Copy link
Member

yatsukhnenko commented Sep 27, 2017

Fixed in 3.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment