mac-cain13 / notificato

Takes care of Apple push notifications (APNS) in your PHP projects.
MIT License
224 stars 44 forks source link

Error: You MUST recompile PHP with a larger value of FD_SETSIZE #57

Closed adusak closed 8 years ago

adusak commented 8 years ago

Hi, I am having the following error poping up:

PHP 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 1048. --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. in /data/web/virtuals/clients/client1/web1094/web/v2/vendor/wrep/notificato/src/Wrep/Notificato/Apns/Gateway.php:152

I know its not related directly to Notificato, but I was wondering if anybody had this issu and if there is some kind of workaround.

Thanks

mac-cain13 commented 8 years ago

I've never seen this error before, any idea what version/build of PHP is used on your system? Are you opening a lot of files of connections? Feels like you use a hosting provider that has quite strict limits.

adusak commented 8 years ago

You are right about the restrictive hosting, that is why I cant change the FD_SETSIZE by my self. The version of PHP is 5.4.12

I was trying to send the notification to around 50 devices using one instance of the Notificato object so I reduced it 20 and the message still pop up. I will try and reduce this number even more and see what happens. Am I right in thinking that it is related to how many devices I try to send the notification at one time?

I know this isn't directly related to the library so I understand if you want to close this issue.

mac-cain13 commented 8 years ago

You could give just sending 1 at a time try, just to see if it solves the FD_SETSIZE problem.

But I think your provider is with PHP 5.4 and such restrictive settings not really a good fit to deploy things like sending push notifications. :(

I'll close this one, but feel free to leave another comment.