Yii2-Ask PHP to use the queue problem

Source: Internet
Author: User
I currently use the background of the app is Yii2 write, do push the use of the BEANSTALKD queue

The listener queue process has never been hung during local development
php yii workerOr./yii worker

But the Local has 终端 never been shut down.

I've developed it on openSUSE before, and it's okay to switch to WIN10 later.

But put on the server on worker a variety of hanging, basically a push to hang, initially suspected, push the log output to the terminal problem, output output to the buffer, the result is still hanging, in the later is the content redirection, ./yii worker > push.log& also did not solve the problem,

So consult your predecessors, have no experience of learning

Reply content:

I currently use the background of the app is Yii2 write, do push the use of the BEANSTALKD queue

The listener queue process has never been hung during local development
php yii workerOr./yii worker

But the Local has 终端 never been shut down.

I've developed it on openSUSE before, and it's okay to switch to WIN10 later.

But put on the server on worker a variety of hanging, basically a push to hang, initially suspected, push the log output to the terminal problem, output output to the buffer, the result is still hanging, in the later is the content redirection, ./yii worker > push.log& also did not solve the problem,

So consult your predecessors, have no experience of learning

./yii worker > push.log 2>&1 &
The standard error is also redirected.

No more, see if the script will touch the exit die or something;

No more, use valgrind php yii worker to try to see if PHP itself or the extension has a segment error

If you are disconnecting, add nohup

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: [email protected] and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.