jakubkulhan / bunny

Performant pure-PHP AMQP (RabbitMQ) sync/async (ReactPHP) library
MIT License
698 stars 101 forks source link

You MUST recompile PHP with a larger value of FD_SETSIZE #155

Open xrh527 opened 2 months ago

xrh527 commented 2 months ago

Consumer reports an error after running for a period of time: 【DEBUG】【WARNING】:stream_select(): You MUST recompile PHP with a larger value of FD_SETSIZE. It is set to 1024, but you have descriptors numbered at least as high as 1045. --enable-fd-setsize=2048 is recommended, but you may want to set it to equal the maximum number of open files supported by your system, in order to avoid seeing this error again at a later date. at file:/easyswoole/vendor/bunny/bunny/src/Bunny/Client.php line:206

WyriHaximus commented 2 months ago

Hey, there is nothing you can do about that error when using the sync client in 0.5 as it uses an internal event loop built on the stream_select function. My advise would be to migrate to either 0.6 which is using the ReactPHP event loop and fibers. Or to the async client in 0.5 which also uses the ReactPHP event loop.

WyriHaximus commented 2 months ago

Completely forgot to mention that you will also need a event loop extension such as ext-uv and ext-ev.