2

I'm getting tons of these running Magento ver. 1.8.1.0, has anybody ever seen this?

TL;DR It's trying to enter a session key in core_session where one already exists.

We're running a standard, single instance setup on AWS.

PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'e1af8078f907ce3ccc52520d2ebe3088' for key 'PRIMARY'' in /var/www/magento/shop/lib/Zend/Db/Statement/Pdo.php:228\nStack trace:\n#0 /var/www/magento/shop/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)\n#1 /var/www/magento/shop/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)\n#2 /var/www/magento/shop/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)\n#3 /var/www/magento/shop/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)\n#4 /var/www/magento/shop/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO co...', Array)\n#5 /var/www/magento/shop/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTOco...', Array)\n#6 /var/www/magento/shop/lib/Zend/Db/Adapter/Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query('INSERT IN in /var/www/magento/shop/lib/Zend/Db/Statement/Pdo.php on line 234, referer: ...

The session_id and referer vary, of course. Thanks in advance!

  • 3
    Hi first step i would change session save storage from database to file. Therefore replace <session_save><!CDATA[db]]></session_save> with <session_save><!CDATA[files]]></session_save> in app/etc/local.xml. – Stefan Bothner Nov 15 '14 at 17:10
  • Thanks, @StefanBothner. I'll try that when I get a chance. I'm not getting the error on staging, only production, so I'll have to wait until traffic is very low to change session storage (and blow away all user sessions). – RobL Nov 17 '14 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.