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

FiberError: Cannot Resume a Fiber That Is Not Suspended with reactphp-redis During High Concurrency #159

Closed
pfk84 opened this issue Sep 17, 2024 · 2 comments
Labels

Comments

@pfk84
Copy link

pfk84 commented Sep 17, 2024

I’m not sure if this issue is specifically related to this library or ReactPHP, but currently, it only occurs with reactphp-redis.

When I run something like:

$counter = await($this->redis->eval(self::LUA_SCRIPT, 1, $uri, $period));

During periods of high concurrency, I encounter the following error:

Unhandled promise rejection with FiberError: Cannot resume a fiber that is not suspended in /app/vendor/react/async/src/SimpleFiber.php:28

Do you have any insights into why this is happening or what I could do to resolve it? Interestingly, when I work with the promises directly, everything functions correctly.

@pfk84
Copy link
Author

pfk84 commented Oct 18, 2024

No idea? :( Pretty sure it's due to the eval... Other commands just work fine.

@clue clue added the question label Dec 28, 2024
@clue
Copy link
Owner

clue commented Dec 28, 2024

@pfk84 Thank you for reporting, this definitely should not have happened!

Unfortunately, this is somewhat hard if not impossible to trace unless we have reproducible code that shows this is related to this project. Currently, I don't see anything that would cause this kind of error in this project and have no reason to believe this would be caused by anything related to the EVAL Redis command, as this project doesn't really employ any special handling for individual Redis commands.

In the past, we've seen some similar reports in friends-of-reactphp/mysql#123 (comment) and reactphp/async#50 (comment) that all boiled down to incorrect usage of async()/await(), so this might be something worth investigating.

I understand this may be frustrating, but as much as I'd love to help, I'm sure you understand this would be out of scope for this project on its own. If you need more personalized help for a commercial project, please shoot me an email and I'm happy to take a look at this together with you. Likewise, if you can reproduce this and reply with a public gist, I'm happy to take a look at this when time allows.

I hope this helps! 👍 If so, consider supporting this project, for example by becoming a sponsor ❤️

@clue clue closed this as completed Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants