How to properly handle blocking tasks in react-php? #601
Unanswered
mrAndersen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I have endlessly running application that is doing some work. Most of the work is done asynchronously, however I need to use mysql stored procedures and mysql client https://github.com/friends-of-reactphp/mysql doesn't support calling procedures, so I am forced to use blocking PDO.
The question is, how I should correctly organize other code, so asynchronous part will work properly. For example when application starts I am sending bunch of HTTP requests and at the same time bunch of blocking MYSQL requests are made, because those blocking MYSQL requests are made in a loop, they are getting "merged" and I am simply getting timeouts on that asynchronous HTTP requests, because loop is blocked and unable to process IO, even considering that the actual response arrived in 100-200ms, because those blocking mysql requests are being processed.
Any hints how I can solve that issues?
Beta Was this translation helpful? Give feedback.
All reactions