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.