Magento – Magento place order redirects to shopping cart empty

cartcheckoutPHP

I just changed my server, all the files and database are the same i had previously.
Now all of sudden i am having this issue.
I add item to cart, go to checkout page, click on place order and magento start processing order and rather than going on the Checkout Success Page magento shows "SHOPPING CART EMPTY" but the order is also placed and is visible in magento sales and email is also sent to the customer.

I thought it was the permission issue so i used the magento-cleanup.php file but no luck.

What could be the issue?

Best Answer

I was facing this problem on Magento 2, and realized it only happens when using Redis.

The problem was solved by increasing break_after_frontend from 5 to 15 in app/etc/env.php. I saw people struggling with the same problem on Magento 1, and the solution is quite much the same, but in app/etc/local.xml as described here.