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

Warning: stream_select(): unable to select #448

Open
krajcikondra opened this issue Oct 18, 2021 · 3 comments
Open

Warning: stream_select(): unable to select #448

krajcikondra opened this issue Oct 18, 2021 · 3 comments

Comments

@krajcikondra
Copy link

krajcikondra commented Oct 18, 2021

Hi,

I had working chat in my web applicatin 2 months ago but something happend and now is my chat broken. I don`t know why.

When I run my websocket server

php bin/console gos:websocket:server

then websocket server running without error. When I connect via javascript client to websocket server evertything looks fine

[2021-10-18T13:25:28.876644+02:00] websocket.DEBUG: INSERT CLIENT 1229 {"token":{"Lexik\\Bundle\\JWTAuthenticationBundle\\Security\\Authentication\\Token\\JWTUserToken":"JWTUserToken(user=\"[email protected]\", authenticated=true, roles=\"\")"},"username":"[email protected]"} [] [2021-10-18T13:25:28.876702+02:00] websocket.INFO: [email protected] connected {"connection_id":1229,"session_id":"1627219109616d59a8d5b60593063675","storage_id":"1229"} []

In log folder is no error but in Chrome -> network are no messages in websocket connection. I have ChatTopic.php and tried debug onSubscribe function but it is not called.

Some idea how debug why onSubscribe function is not called? I have version 3.7.2 of gos/web-socket-bundle

Edit: When I stop websocket server I get following warning:

php.DEBUG: Warning: stream_select(): unable to select [4]: Interrupted system call (max_fd=11) {"exception":{"Symfony\\Component\\ErrorHandler\\Exception\\SilencedErrorContext":{"severity":2,"file":"/var/www/html/vendor/react/event-loop/src/StreamSelectLoop.php","line":290,"trace":[{"file":"/var/www/html/vendor/react/event-loop/src/StreamSelectLoop.php","line":231,"function":"streamSelect","class":"React\\EventLoop\\StreamSelectLoop","type":"->"}],"count":1}}} []

@mbabker
Copy link
Contributor

mbabker commented Oct 18, 2021

I doubt this is an issue within the bundle code. Without the full context, it seems like the react/event-loop is having issues reading from the chosen stream. Most likely, with the stream loop, this would be related to the php.ini configuration.

@krajcikondra
Copy link
Author

Ok, this warning maybe not relate with my problem because my php.ini and versions of react/* libraries are same as 2 months ago when my chat works perfectelly

Have you some idea how find out why my ChatTopic::onSubscribe function was not called?
I dont`t know where start debug :-(

@clue
Copy link

clue commented Mar 14, 2023

It looks like this should have been fixed via reactphp/event-loop#245, perhaps you can take a look and confirm? 👍

For context: PHP prints a warning whenever a system call is interrupted by a signal. ReactPHP handles this just fine, so we've had to mute this unneeded warning. On top of this, the latest version now also makes sure no external error handlers such as Symfony's can "see" this muted warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants