Magento – Redis Issue In Magento 2

awserrormagento2ordersredis

There is a very strange issue on our Magento site. We are performing some custom write operations after order has been placed using checkout_submit_all_after event. These work fine for some order but the code breaks sometimes. I put a log on every step and got this error .

Notice: Redis::exec(): send of 8192 bytes failed with errno=104
Connection reset by peer in vendor/colinmollenhour/credis/Client.php

These errors only show for some random orders. I contacted our AWS server guy and he claimed its a coding issue and not Redis configuration. I don't really know Redis so I don't know the next step.

Please, does anyone has any clue on how I can solve this?? I also notice when we clear Magento cache, the issue will be fixed but if we don't clear cache, the code starts breaking.

Thanks

Best Answer

It's not a magento issue it's a redis and / or sever config issue. Redis is killing the connection. I was typing up a reply and then I spotted this answer on SO

https://stackoverflow.com/a/52612405/10121426

So yeah connection issue. Not coding issue.

Related Topic