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
Solved! Go to Solution.
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.
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'
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.
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