Zend certified PHP/Magento developer

magento 1.9 not redirecting customer to success page after a successful order

I’m facing a strange problem I’m working on magento 1.9.
Sometimes after a success order the customer is not redirected to success page, this happens not in all orders maybe 1 of 5.
after diagnosing the issue I found out that in

core/Mage/Checkout/controllers/OnepageController.php

it seems that there’s no getLastSuccessQuoteId() as showen in the pictures bellow

I was thinking that it may be happen because of redis but i’m not sure. does anyone faced some similar problem before or have an idea on how can I solve this issue ? Thank you 🙂
Screenshot 2020-03-31 at 22.05.47.png

strong textenter image description here