我们遇到的问题是我们的某些客户无法登录。这不是浏览器特定的,并且发生在浏览器中。此外,当发生这种情况时,客户有时无法从多个浏览器登录。
经过大量调试后,我们发现这很可能是由于会话造成的。如果我们重置密码,问题就会被清除。我们还初步发现问题是达到了内存限制,但是在将内存从1GB增加到2GB之后就已经删除了。
我们正在使用Magento 1.4.1.1和NGINX + PHP-FPM
在PHP-FPM中执行慢速日志的堆栈转储时,我们发现堆栈跟踪为
[0x00000000028b88d0] session_start() /mnt/www/t1/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php:115
[0x00000000028b84d8] start() /mnt/www/t1/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php:155
[0x00000000028b8330] init() /mnt/www/t1/app/code/core/Mage/Core/Model/Session/Abstract.php:84
[0x00000000028b8170] init() /mnt/www/t1/app/code/core/Mage/Core/Model/Session.php:39
[0x00000000028b7ea8] __construct() /mnt/www/t1/app/code/core/Mage/Core/Model/Config.php:1206
[0x00000000028b7d38] getModelInstance() /mnt/www/t1/app/Mage.php:431
[0x00000000028b7a98] getModel() /mnt/www/t1/app/Mage.php:445
[0x00000000028b6ba8] getSingleton() /mnt/www/t1/app/code/local/Mage/Core/Controller/Varien/Action.php:484
[0x00000000028b6890] preDispatch() /mnt/www/t1/app/code/core/Mage/Core/Controller/Front/Action.php:65
[0x00000000028b56e8] preDispatch() /mnt/www/t1/app/code/local/Mage/Core/Controller/Varien/Action.php:408
[0x00000000028b35b0] dispatch() /mnt/www/t1/app/code/local/Mage/Core/Controller/Varien/Router/Standard.php:269
[0x00000000028b2b90] match() /mnt/www/t1/app/code/local/Mage/Core/Controller/Varien/Front.php:182
[0x00000000028b22d0] dispatch() /mnt/www/t1/app/code/local/Mage/Core/Model/App.php:304
[0x00000000028b1748] run() /mnt/www/t1/app/Mage.php:596
[0x00000000028b10a8] run() /mnt/www/t1/primus/index.php:81
有关为何可能发生这种情况以及我们如何调试此
的任何建议EDIT 在异常日志中,我们确实遇到了这个问题
2012-04-05T08:26:12+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'Customer ID is not set' in /mnt/www/t1/app/Mage.php:550
Stack trace:
#0 /mnt/www/t1/app/code/local/MageWorx/CustomerCredit/Model/Credit.php(106): Mage::throwException('Customer ID is ...')
#1 /mnt/www/t1/app/code/local/MageWorx/CustomerCredit/Model/Credit.php(49): MageWorx_CustomerCredit_Model_Credit->_prepare()
#2 /mnt/www/t1/app/code/local/MageWorx/CustomerCredit/Block/Checkout/Cart/Coupon.php(49): MageWorx_CustomerCredit_Model_Credit->loadCredit()
#3 /mnt/www/t1/app/code/core/Mage/Core/Model/Layout.php(465): MageWorx_CustomerCredit_Block_Checkout_Cart_Coupon->__construct(Array)
#4 /mnt/www/t1/app/code/core/Mage/Core/Model/Layout.php(411): Mage_Core_Model_Layout->_getBlockInstance('customercredit/...', Array)
#5 /mnt/www/t1/app/code/core/Mage/Core/Model/Layout.php(446): Mage_Core_Model_Layout->createBlock('customercredit/...', 'checkout.cart.c...')
#6 /mnt/www/t1/app/code/core/Mage/Core/Model/Layout.php(238): Mage_Core_Model_Layout->addBlock('customercredit/...', 'checkout.cart.c...')
#7 /mnt/www/t1/app/code/core/Mage/Core/Model/Layout.php(204): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#8 /mnt/www/t1/app/code/core/Mage/Core/Model/Layout.php(209): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#9 /mnt/www/t1/app/code/local/Mage/Core/Controller/Varien/Action.php(343): Mage_Core_Model_Layout->generateBlocks()
#10 /mnt/www/t1/app/code/local/Mage/Core/Controller/Varien/Action.php(270): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#11 /mnt/www/t1/app/code/local/Cerulean/Checkout/controllers/CartController.php(147): Mage_Core_Controller_Varien_Action->loadLayout()
#12 /mnt/www/t1/app/code/local/Mage/Core/Controller/Varien/Action.php(419): Cerulean_Checkout_CartController->indexAction()
#13 /mnt/www/t1/app/code/local/Mage/Core/Controller/Varien/Router/Standard.php(269): Mage_Core_Controller_Varien_Action->dispatch('index')
#14 /mnt/www/t1/app/code/local/Mage/Core/Controller/Varien/Front.php(182): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#15 /mnt/www/t1/app/code/local/Mage/Core/Model/App.php(304): Mage_Core_Controller_Varien_Front->dispatch()
#16 /mnt/www/t1/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#17 /mnt/www/t1/index.php(81): Mage::run('default', 'store')
#18 {main}