Gert-dev / php-ide-serenata

Atom IDE package that integrates the Serenata server to provide PHP code assistance
https://serenata.gitlab.io/
Other
275 stars 19 forks source link

Rate-limit the output of the PHP Server messages #467

Closed djfm closed 5 years ago

djfm commented 5 years ago

I get:

The PHP Server has something to say: Warning: pcntl_signal_dispatch() has been disabled for security reasons in /home/fram/.cache/php-ide-serenata/server/files/vendor/react/event-loop/src/StreamSelectLoop.php on line 232

Approximately every 5 seconds which is pretty annoying. Perhaps a better fix would be for the server to stop reporting this? I'm open to suggestions, I like this package and would like to make it more polished.

Gert-dev commented 5 years ago

Hi.

This appears to be originating from a 3rd party dependency used by the Serenata server, namely ReactPHP Event Loop.

However, the problem appears to be that one of the functions it requires, pcntl_signal_dispatch, is disabled or blacklisted in your PHP configuration. As such, I think rate limiting the client might just coincidentally work around the problem if this fixed it for you, since the library will keep trying to call this function when no stream activity is present.

A permanent fix would be to unblacklist or enable this function again in your PHP configuration or, alternatively, you can also install and enable one of the extensions listed on the readme in order to use an alternative implementation from the stream one to try and avoid use of the function.

Gert-dev commented 5 years ago

Closing this due to staleness.