简体   繁体   English

Beanstalkd / Pheanstalk-根本无法正常工作! (WAMP / PHP / LARAVEL)

[英]Beanstalkd / Pheanstalk - Cant get it working at all! (WAMP/PHP/LARAVEL)

So im trying to get Pheanstalk queue working in Laravel 4, which is built in (i had to composer instal the beanstalkd lib). 所以我试图让Pheanstalk队列在内置的Laravel 4中工作(我必须作曲家安装beantalkd lib)。

Now thats done... im trying to send jobs to my workers. 现在就完成了...我试图将工作发送给我的工人。 Everytime i do i get this error 每次我收到此错误

[2013-04-25 08:55:03] log.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\adam\L4\vendor\pda\pheanstalk\classes\Pheanstalk\Socket\StreamFunctions.php line 55' in C:\wamp\www\adam\L4\vendor\pda\pheanstalk\classes\Pheanstalk\Socket\StreamFunctions.php:55
Stack trace:
#0 C:\wamp\www\adam\L4\bootstrap\compiled.php(5006): Symfony\Component\Debug\ErrorHandler->handleFatal()
#1 [internal function]: Illuminate\Exception\ExceptionServiceProvider->Illuminate\Exception\{closure}()
#2 {main} [] []

I also get this error in my log: 我的日志中也出现此错误:

exception 'ErrorException' with message 'Catchable Fatal Error: Argument 1 passed to Illuminate\Queue\Jobs\Job::resolveAndFire() must be of the type array, null given

Which seems to be looped as soon as i run 'php artisan queue:listen'. 一旦我运行“ php artisan queue:listen”,这似乎就会循环播放。

I have downloaded the console for beanstalkd and configure it to listen to server localhost:11300. 我已经下载了beantalkd的控制台并将其配置为侦听服务器localhost:11300。

Which gives me an error: unhandled response. 这给了我一个错误:未处理的响应。

I have changed my httpd.conf and added Listen 11300 to it and restarted. 我已经更改了httpd.conf并添加了Listen 11300并重新启动。

Any ideas where im going wrong? 任何想法,我错了吗? I cant see much docs for Beanstalkd and the Laravel docs dont help either. 我看不到Beanstalkd的许多文档,而Laravel文档也无济于事。

Thanks for any ideas! 感谢您的任何想法!

抱歉, beanstalkd在Windows上不可用

As an attempt to answer an old question legitimately for anyone reading, I propose the following. 为了对任何阅读者合法地回答一个老问题,我提出以下建议。

As an alternative to using Pheanstalk, you could perhaps use Redis. 作为使用Pheanstalk的替代方法,您可以使用Redis。 There's a Chocolatey install for it: 有一个Chocolatey安装:

https://chocolatey.org/packages/redis-64 https://chocolatey.org/packages/redis-64

You can install as a Windows service and access the command line tool after installation with: 您可以安装为Windows服务,并在安装后使用以下命令访问命令行工具:

    C:\> redis-cli
    C:\> 127.0.0.1:6379> <your command here>

You could perhaps use something like Forever to keep your queue command running in the background (with automatic restarts on fail if necessary): 您也许可以使用诸如Forever之类的方法来使队列命令在后台运行(必要时在失败时自动重启):

https://www.npmjs.com/package/forever https://www.npmjs.com/package/forever

using a command like 使用类似的命令

    forever -c php artisan queue:listen -a -l C:\somelogdirectory\somelogfile.txt

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM