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

[5.3]PHP have to --enable-pcntl if use queue #14909

Closed
ac1982 opened this issue Aug 20, 2016 · 13 comments
Closed

[5.3]PHP have to --enable-pcntl if use queue #14909

ac1982 opened this issue Aug 20, 2016 · 13 comments
Labels

Comments

@ac1982
Copy link

ac1982 commented Aug 20, 2016

I tried this under my windows with PHP 7.0 (no way to enable pcntl):
php artisan queue:work --timeout=360 --queue=high,low --sleep=3 --tries=3
Will get this exception.

  [RuntimeException]
  The pcntl extension is required in order to specify job timeouts.

But same project in my server ( Ubuntu 16.04 with PHP 7.0 enable pcntl), it works fine.
So if it is necessary to add in "Server Requirements" ?

@gholol
Copy link

gholol commented Aug 20, 2016

Same...
Unfortunately pcntnl is not available for Windows based systems.

Tried to run my queue with

php artisan queue:work --daemon --sleep=1

and even

php artisan queue:listen

Getting same error... Documentation said nothing about this change, So we must either run everything under Homestead or downgrade to 5.2...

@taylorotwell What about windows users? Now we cannot use the queue system.

@GrahamCampbell
Copy link
Member

Windows users need to pass --timeout 0. We don't want to silently not use the timeout. If you don't want it, explicitly set it to 0 to disable it.

@gholol
Copy link

gholol commented Aug 20, 2016

Gah! changing --timeout=0 to --timeout 0 did the trick thanks, it works now

@morloderex
Copy link
Contributor

@GrahamCampbell @taylorotwell we should maybe at a note on the docs regarding this issue.

@GrahamCampbell
Copy link
Member

Or we could just update the exception message to say turn the timeout off if you don't want timeouts?

@morloderex
Copy link
Contributor

Yeah might be better.

@wdmtech
Copy link

wdmtech commented Sep 2, 2016

@gholol - I seem to be getting the same message using either syntax:

image

This is on an 5.2-5.3 upgraded project - I'll try a fresh 5.3 project too.


EDIT: Yep - same issue. No error with php artisan queue:work --timeout 0 however.

@gholol
Copy link

gholol commented Sep 2, 2016

@wdmtech It doesn't work with queue listener, you have to use worker.

php artisan queue:work --daemon --timeout 0

@wdmtech
Copy link

wdmtech commented Sep 2, 2016

Thanks @gholol. I got it working that way.

Interesting, any idea why not?

It has --timeout as an option

image

@gholol
Copy link

gholol commented Sep 2, 2016

@wdmtech Since 5.3, there was a change and pcntl extension is now required to handle jobs.

There's no Pcntl for windows so Graham did make a fix with this pull request #14741

I suspect he forgot about the listener 😀

@taylorotwell
Copy link
Member

Yes looks like we just need to handle fix this on the listen command maybe @GrahamCampbell? Can someone send over a PR?

@GrahamCampbell
Copy link
Member

I didn't forget about it as such. I just didn't expect anyone to want to use it.

@GrahamCampbell
Copy link
Member

GrahamCampbell commented Sep 3, 2016

I mean, we can fix it. :P

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

No branches or pull requests

6 participants