cancel
Showing results for 
Search instead for 
Did you mean: 

Warning: session_start(): Failed to decode session object. Session has been destroyed

Warning: session_start(): Failed to decode session object. Session has been destroyed

Hi,

 

I'm really hoping someone can help me with an issue I'm facing with Magento 2. I've spent three days so far trying to figure it out myself without any luck.

 

So that we can process a large amount of orders from different marketplaces, we need to be able to ship multiple orders in one go. For this reason, we purchased an extension called Mass Order Actions by Amasty.

 

Unfortunately when selecting orders and pressing Ship, the page fails to load and gives a HTTP 500 errror. When i refresh the page i get the error below:

 

1 exception(s):
Exception #0 (Exception): Warning: session_start(): Failed to decode session object. Session has been destroyed in /home/clearstock/public_html/vendor/magento/framework/Session/SessionManager.php on line 189

Exception #0 (Exception): Warning: session_start(): Failed to decode session object. Session has been destroyed in /home/clearstock/public_html/vendor/magento/framework/Session/SessionManager.php on line 189
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'session_start()...', '/home/clearstoc...', 189, Array)
#1 /home/clearstock/public_html/vendor/magento/framework/Session/SessionManager.php(189): session_start()
#2 /home/clearstock/public_html/generated/code/Magento/Backend/Model/Session/Interceptor.php(63): Magento\Framework\Session\SessionManager->start()
#3 /home/clearstock/public_html/vendor/magento/framework/Session/SessionManager.php(130): Magento\Backend\Model\Session\Interceptor->start()
#4 /home/clearstock/public_html/generated/code/Magento/Backend/Model/Session/Interceptor.php(14): Magento\Framework\Session\SessionManager->__construct(Object(Magento\Framework\App\Request\Http), Object(Magento\Framework\Session\SidResolver\Proxy), Object(Magento\Backend\Model\Session\AdminConfig), Object(Magento\Framework\Session\SaveHandler), Object(Magento\Framework\Session\Validator), Object(Magento\Framework\Session\Storage), Object(Magento\Framework\Stdlib\Cookie\PhpCookieManager), Object(Magento\Framework\Stdlib\Cookie\CookieMetadataFactory), Object(Magento\Framework\App\State))
#5 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Backend\Model\Session\Interceptor->__construct(Object(Magento\Framework\App\Request\Http), Object(Magento\Framework\Session\SidResolver\Proxy), Object(Magento\Backend\Model\Session\AdminConfig), Object(Magento\Framework\Session\SaveHandler), Object(Magento\Framework\Session\Validator), Object(Magento\Framework\Session\Storage), Object(Magento\Framework\Stdlib\Cookie\PhpCookieManager), Object(Magento\Framework\Stdlib\Cookie\CookieMetadataFactory), Object(Magento\Framework\App\State))
#6 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Backend...', Array)
#7 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Backend...')
#8 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(144): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Backend...')
#9 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(230): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Backend...', NULL, 'session', 'Magento\\Backend...')
#10 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\\Backend...', Array, Array)
#11 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Backend...', Array, Array)
#12 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Backend...')
#13 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(144): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Backend...')
#14 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(230): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'localeResolver', 'Magento\\Framewo...')
#15 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\\Framewo...', Array, Array)
#16 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Framewo...', Array, Array)
#17 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...')
#18 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(144): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...')
#19 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(230): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'localeDate', 'Magento\\Framewo...')
#20 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\\Framewo...', Array, Array)
#21 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Framewo...', Array, Array)
#22 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...')
#23 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(144): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...')
#24 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(230): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'localeDate', 'Ess\\M2ePro\\Help...')
#25 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Ess\\M2ePro\\Help...', Array, Array)
#26 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Ess\\M2ePro\\Help...', Array, Array)
#27 /home/clearstock/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Ess\\M2ePro\\Help...')
#28 /home/clearstock/public_html/vendor/m2e/ebay-amazon-magento2/Helper/Factory.php(39): Magento\Framework\ObjectManager\ObjectManager->get('Ess\\M2ePro\\Help...', Array)
#29 /home/clearstock/public_html/vendor/m2e/ebay-amazon-magento2/Helper/AbstractHelper.php(36): Ess\M2ePro\Helper\Factory->getObject('Data', Array)
#30 /home/clearstock/public_html/vendor/m2e/ebay-amazon-magento2/Helper/Module/Wizard.php(238): Ess\M2ePro\Helper\AbstractHelper->getHelper('Data')
#31 /home/clearstock/public_html/vendor/m2e/ebay-amazon-magento2/Helper/Module/Wizard.php(105): Ess\M2ePro\Helper\Module\Wizard->getConfigValue('installationEba...', 'status')
#32 /home/clearstock/public_html/vendor/m2e/ebay-amazon-magento2/Helper/Module/Wizard.php(83): Ess\M2ePro\Helper\Module\Wizard->getStatus('installationEba...')
#33 /home/clearstock/public_html/vendor/m2e/ebay-amazon-magento2/Helper/Module/Wizard.php(93): Ess\M2ePro\Helper\Module\Wizard->isCompleted('installationEba...')
#34 /home/clearstock/public_html/vendor/m2e/ebay-amazon-magento2/Helper/View/Ebay.php(71): Ess\M2ePro\Helper\Module\Wizard->isFinished('installationEba...')
#35 /home/clearstock/public_html/vendor/m2e/ebay-amazon-magento2/Helper/Module.php(201): Ess\M2ePro\Helper\View\Ebay->isInstallationWizardFinished()
#36 /home/clearstock/public_html/vendor/m2e/ebay-amazon-magento2/Plugin/AbstractPlugin.php(52): Ess\M2ePro\Helper\Module->isReadyToWork()
#37 /home/clearstock/public_html/vendor/m2e/ebay-amazon-magento2/Plugin/AbstractPlugin.php(33): Ess\M2ePro\Plugin\AbstractPlugin->canExecute()
#38 /home/clearstock/public_html/vendor/m2e/ebay-amazon-magento2/Plugin/HealthStatus/Magento/Framework/App/FrontController.php(42): Ess\M2ePro\Plugin\AbstractPlugin->execute('dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Array)
#39 /home/clearstock/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Ess\M2ePro\Plugin\HealthStatus\Magento\Framework\App\FrontController->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#40 /home/clearstock/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#41 /home/clearstock/public_html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)
#42 /home/clearstock/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#43 /home/clearstock/public_html/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#44 /home/clearstock/public_html/index.php(57): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#45 {main}

No shipment is created and the status stays the same. Does anyone have any ideas? I've already contacted my hosting provider who had this reponse: 

 

"We have checked but there is no any OS level logs generates for the domain, hence it's really difficult to identify the exact issue, still we have searched lot on the internet but not found any case related to it, however, all the settings on the server are fine. In this situation, we would request you to please check with magento support Or check with any Magento developer and let us know if there is any OS level settings are required, so that we will check accordingly and help you further."

 

Another developer suggested the issue was related to the size of session storage.

 

"Looks like you are using the database to store the session storage but size is not enough. To resolve the error you should increase allowable size of sessions."

 

I contacted my host and asked them to increase the limit which they did and it never resolved the issue.

 

The site is hosted on a Linux VPS:

 

cPanel Version72.0 (build 9)
Apache Version2.4.33
PHP Version7.1.19
MySQL Version10.0.35-MariaDB
Architecturex86_64
Operating System

linux

 

Magento ver. 2.2.0

 

Any help on this would be really appreciated!

 

Thanks,

Jamie

6 REPLIES 6

Re: Warning: session_start(): Failed to decode session object. Session has been destroyed

Hi @jamieparkes

 

ok i understand the error you are facing and looks like previously have seen this kind of error on the same !

 

Below i am sharing two links , which might help you to resolve this issue ,

 

https://magento.stackexchange.com/questions/125264/magento-site-not-opening-after-cli-installation

 

https://magento.stackexchange.com/questions/124199/magento-2-there-has-been-an-error-processing-your...

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

Re: Warning: session_start(): Failed to decode session object. Session has been destroyed

Hello @jamieparkes

 

change storage type db into env.php

 

 

hope it will help you.

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Warning: session_start(): Failed to decode session object. Session has been destroyed

Appreciate the support on this.

 

I applied the changes in the first link you provided suggested by MyrkkyMies. This has removed the session expired message. I do still face issues completing the action i was trying to perform but changes to the php.ini and env.php file stopped the Warning: session_start(): Failed to decode session object. Session has been destroyed error message.

 

Thanks again for your support.

Re: Warning: session_start(): Failed to decode session object. Session has been destroyed

Hi @jamieparkes

 

Glad to know that you have resolved your issue , If you found the answer is helpful and solved your problem , click on accept as solution so other user gets helped

 

Let me know if you still have any issue on this !

if issue solved,Click Kudos & Accept as Solution

Re: Warning: session_start(): Failed to decode session object. Session has been destroyed

Thanks again for the support on this.

 

I was hoping i could rack some brains again.

 

After making the changes here: https://magento.stackexchange.com/questions/125264/magento-site-not-opening-after-cli-installation

 

I now receive this error: 

 

Warning: SessionHandler::read(): open(/home/clearstock/public_html/var/session/sess_0a2062588cb5ecd6c8a1dbafe110fc13, O_RDWR) failed: No such file or directory (2) in /home/clearstock/public_html/vendor/magento/framework/Session/SaveHandler/Native.php on line 22

 

It mentions the directory i created. I'm presuming when certain commands are run, the core magento directories are refreshed.

 

Is there anyway to make this a more permanent fix and preventing var/session from being removed?

 

Thanks,

Jamie

Re: Warning: session_start(): Failed to decode session object. Session has been destroyed

Hello
Hope you all are well 
anyone get the solution, We facing the same issue in our production server,
Could any one have idea please share,

Thank you