cancel
Showing results for 
Search instead for 
Did you mean: 

Redirecting to Cart page from Checkout page after Place Order

SOLVED

Redirecting to Cart page from Checkout page after Place Order

I added products to cart. Then did proceed to checkout. I have tried Cash on Delivery. Everything is fine until the order review section. And then when I click the Place Order button then it gets redirected to Shopping Cart page instead of going to Order Success page. The cart items are still there. Also the order is placed, can be seen in back-end. As I debug, session is getting destroyed.


How to solve it ?

In console network every time different errors are coming as below:

Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 12288 bytes) in /domains/example.com/___deploy/releases/20170206090110/vendor/magento/framework/Model/AbstractExtensibleModel.php on line 251

Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 16384 bytes) in /domains/example.com/___deploy/releases/20170206090110/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228

 

<br />
<b>Fatal error</b>: Allowed memory size of 805306368 bytes exhausted (tried to allocate 12288 bytes) in <b>/domains/example.com/___deploy/releases/20170206090110/vendor/magento/framework/Model/AbstractModel.php</b> on line <b>354</b><br />
{"messages":{"error":[{"code":500,"message":"Server internal error. See details in report api\/155478971667"}]}}


Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 12288 bytes) in /domains/example.com/___deploy/releases/20170206090110/vendor/magento/framework/Model/AbstractExtensibleModel.php on line 251


Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 12288 bytes) in /domains/example.com/___deploy/releases/20170206090110/vendor/magento/framework/Model/ResourceModel/Db/VersionControl/Snapshot.php on line 58

Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 16384 bytes) in /domains/example.com/___deploy/releases/20170206090110/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Redirecting to Cart page from Checkout page after Place Order

Hi @jitesh_maheshwary ,

 

As @PankajS_Magento  and @Robert Rand you should check your current memory limit (the error is about that).

You have, normally, 2 options:

 

1) Check the code to be sure you're not wasting resources.

2) If previous step can't be applied, you'll need to try to increase your memory resources.

 

I agree with @Robert Rand, your hosting service could not be optimized for M2 actually. I think the 16 GB recommendation from @PankajS_Magento is maybe too much. You should check first the current limit and increase a little bit that value.

View solution in original post

5 REPLIES 5

Re: Redirecting to Cart page from Checkout page after Place Order

Hi @jitesh_maheshwary 

 

First you need to increase your memory_limit from php.ini file. Change your limit to memory_limit = 16GB and restart your server once.

 

I hope it will help you.

 

Thanks

--

If answer is helpful, Please give 'Kudos' and accept 'Answer as Solution'

Re: Redirecting to Cart page from Checkout page after Place Order

805306368 bytes is 805mb. If you're running out of memory, you probably need to up the limit in php.ini. See suggestions at https://devdocs.magento.com/guides/v2.3/install-gde/prereq/php-settings.html

If you reach out to your hosting provider, they should be able to help. I'd guess that your hosting account isn't specifically optimized for Magento yet.

Re: Redirecting to Cart page from Checkout page after Place Order

Hi @jitesh_maheshwary ,

 

As @PankajS_Magento  and @Robert Rand you should check your current memory limit (the error is about that).

You have, normally, 2 options:

 

1) Check the code to be sure you're not wasting resources.

2) If previous step can't be applied, you'll need to try to increase your memory resources.

 

I agree with @Robert Rand, your hosting service could not be optimized for M2 actually. I think the 16 GB recommendation from @PankajS_Magento is maybe too much. You should check first the current limit and increase a little bit that value.

Re: Redirecting to Cart page from Checkout page after Place Order

If you need to set 16gb to php, you need to fix your code. Thats way way too much.

3gb is more than enough, everything more than that means code needs to be optimized

Re: Redirecting to Cart page from Checkout page after Place Order

@jitesh_maheshwary 

 

Thanks lot This will help me lots