Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1 exception(s): Exception #0 (Exception): Warning: Undefined array key 0 in vendor/colinmollenhour/php-redis-session-abstract/src/Cm/RedisSession/Handler.php on line 515 #38399

Closed
5 tasks
xtremevision opened this issue Jan 31, 2024 · 14 comments
Assignees
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.6 Indicates original Magento version for the Issue report.

Comments

@xtremevision
Copy link

Preconditions and environment

  • Magento Open Source 2.4.6
  • CentOS 7 x64
  • httpd-2.4.58
  • redis-3.2.12
  • colinmollenhour/cache-backend-redis 1.17.1
  • colinmollenhour/credis v1.16.0
  • colinmollenhour/php-redis-session-abstract v1.5.4
  • MariaDB 10.4.25
  • Infinit theme from Themeforest

PHP 8.1.27 (cli) (built: Dec 19 2023 20:35:55) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.1.27, Copyright (c) Zend Technologies
with Zend OPcache v8.1.27, Copyright (c), by Zend Technologies
with Xdebug v3.3.1, Copyright (c) 2002-2023, by Derick Rethans

Steps to reproduce

  1. Navigate to category pae
  2. Add product to cart
  3. Go to checkout

Expected result

No error message

Actual result

  • Checkout is broken. No shipping prices available and the order summary gets stuck loading.
  • Refreshing the page fixes the checkout and the error does not show up anymore.

1 exception(s):
Exception #0 (Exception): Warning: Undefined array key 0 in /home/michael/www/xxxxxxxxxx/xxxxxxxxxx/vendor/colinmollenhour/php-redis-session-abstract/src/Cm/RedisSession/Handler.php on line 515

Exception #0 (Exception): Warning: Undefined array key 0 in /home/michael/www/xxxxxxxxx/xxxxxxxxx/vendor/colinmollenhour/php-redis-session-abstract/src/Cm/RedisSession/Handler.php on line 515

#1 Cm\RedisSession\Handler->read() called at [vendor/magento/framework/Session/SaveHandler/Redis.php:98]
#2 Magento\Framework\Session\SaveHandler\Redis->read() called at [vendor/magento/framework/Session/SaveHandler.php:212]
#3 Magento\Framework\Session\SaveHandler->callSafely() called at [vendor/magento/framework/Session/SaveHandler.php:125]
#4 Magento\Framework\Session\SaveHandler->read()
#5 session_start() called at [vendor/magento/framework/Session/SessionManager.php:186]
#6 Magento\Framework\Session\SessionManager->start() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#7 Magento\Framework\Session\Generic\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#8 Magento\Framework\Session\Generic\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#9 Magento\Framework\Session\Generic\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/Session/Generic/Interceptor.php:23]
#10 Magento\Framework\Session\Generic\Interceptor->start() called at [vendor/magento/framework/Session/SessionManager.php:123]
#11 Magento\Framework\Session\SessionManager->__construct() called at [generated/code/Magento/Framework/Session/Generic/Interceptor.php:14]
#12 Magento\Framework\Session\Generic\Interceptor->__construct() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121]
#13 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:108]
#14 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:150]
#15 Magento\Framework\ObjectManager\Factory\Compiled->get() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:79]
#16 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:150]
#17 Magento\Framework\ObjectManager\Factory\Compiled->get() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:79]
#18 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:150]
#19 Magento\Framework\ObjectManager\Factory\Compiled->get() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:79]
#20 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:150]
#21 Magento\Framework\ObjectManager\Factory\Compiled->get() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:125]
#22 Magento\Framework\ObjectManager\Factory\Compiled->parseArray() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:86]
#23 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#24 Magento\Framework\ObjectManager\ObjectManager->get() called at [vendor/magento/framework/App/FrontController.php:109]
#25 Magento\Framework\App\FrontController->__construct() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:14]
#26 Magento\Framework\App\FrontController\Interceptor->__construct() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121]
#27 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:108]
#28 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#29 Magento\Framework\ObjectManager\ObjectManager->get() called at [vendor/magento/framework/App/Http.php:115]
#30 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/App/Bootstrap.php:264]
#31 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:30]

image

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Copy link

m2-assistant bot commented Jan 31, 2024

Hi @xtremevision. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

Copy link

m2-assistant bot commented Jan 31, 2024

Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.6 Indicates original Magento version for the Issue report. label Jan 31, 2024
@TheRealHunzik
Copy link

@magento give me 2.4-develop instance

Copy link

Hi @TheRealHunzik. Thank you for your request. I'm working on Magento instance for you.

Copy link

@engcom-Bravo
Copy link
Contributor

Hi @xtremevision,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Steps to reproduce

  • Navigate to category page
  • Add product to cart
  • Go to checkout

Screenshot from 2024-01-31 11-41-45

Screenshot from 2024-01-31 11-42-51

We are able to see the shipping methods and able to place the order.

Kindly recheck the issue in Magento 2.4-develop instance and check if any third party modules causing the issue.

Thanks.

@engcom-Bravo engcom-Bravo added the Issue: needs update Additional information is require, waiting for response label Jan 31, 2024
@xtremevision
Copy link
Author

Ok, I will test with Luma theme instead of the 3rd party theme, as well as by switching off custom modules / 3rd party modules.

@eldaly
Copy link

eldaly commented Feb 1, 2024

Hi
i Have Same issue when i open multi products in one time
Exception #0 (Exception): Warning: Undefined array key 0 in /vendor/colinmollenhour/php-redis-session-abstract/src/Cm/RedisSession/Handler.php on line 515

@Amadeco
Copy link

Amadeco commented Feb 1, 2024

Good evening,
I see this issue also on Magento 2.4.6-p3, redis_version:7.2.4

[2024-02-01T19:10:19.046017+00:00] main.ERROR: Warning: Undefined array key 0 in /home/amadeco/public_html/vendor/colinmollenhour/php-redis-session-abstract/src/Cm/RedisSession/Handler.php on line 515 [] []
[2024-02-01T19:10:19.046802+00:00] main.CRITICAL: Warning: Undefined array key 0 in /home/amadeco/public_html/vendor/colinmollenhour/php-redis-session-abstract/src/Cm/RedisSession/Handler.php on line 515 [] []

hostep referenced this issue in colinmollenhour/php-redis-session-abstract Feb 1, 2024
@xtremevision
Copy link
Author

xtremevision commented Feb 2, 2024

I noticed these messages today in var/log/system.log:

[2024-02-02T19:35:17.139662+00:00] main.WARNING: localhost|2475: Did not write session for ID b3f7mpdhrg0dmgkg8tlnb2uq8r: another process took the lock. /themelayoutpro/ajax/cmsblock/?block_identifier=unlimited-furniture-newsletter-popup [] []
[2024-02-02T19:35:18.689020+00:00] main.WARNING: localhost|2478: Did not write session for ID b3f7mpdhrg0dmgkg8tlnb2uq8r: another process took the lock. /customer/section/load/?sections=&_=1706902508672 [] []

Found this article: https://magento.stackexchange.com/questions/296730/redis-session-error-successfully-broke-lock-for-id-sess-ebfc12b22fa8c8e1fb81dca

I updated the values as per the accepted answer, but to be 100% safe I also created a dedicated redis instance for this site on port 6378.

So far, the checkout error has gone away, and the write session messages as well.

Could it be that I have too many sites accessing the same redis instance, albeit with different redis databases? Could it be another site is accessing the same database as this one effectively corrupting data?

@hostep
Copy link
Contributor

hostep commented Feb 3, 2024

Hi @xtremevision

The bug should only trigger when the setting max_concurrency gets exceeded if I understand it correctly.

According to the comments on colinmollenhour/php-redis-session-abstract@47a1df3, this seems to be a bug that existed in versions 1.5.3 and 1.5.4 of the colinmollenhour/php-redis-session-abstract package.
It should be fixed in version 1.5.5, could you try to update this package to the latest version and see if that solves it for you?

@engcom-Bravo
Copy link
Contributor

@hostep Thanks for your contribution and collaboration here.

Hi @xtremevision,

Thanks for your update.

Kindly refer this comment #38399 (comment) and please let us know if you are still facing any issue.

Thanks.

@xtremevision
Copy link
Author

I updated colinmollenhour/php-redis-session-abstract to 1.5.5 and it seems to have fixed the issue, but I'll do a bit more testing to make sure. Thanks.

@engcom-Bravo
Copy link
Contributor

Hi @xtremevision,

Thanks for your update.

As per this comment #38399 (comment) We are Closing this issue Please feel free to reopen the issue if you are still facing any issue.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.6 Indicates original Magento version for the Issue report.
Projects
None yet
Development

No branches or pull requests

6 participants