Process campaigns using Redis Queue.

Discussion in 'Tips and tricks' started by twisted1919, Feb 27, 2015.

  1. Michael Wilding

    Michael Wilding Active Member

    Joined:
    Apr 28, 2015
    Messages:
    260
    Likes Received:
    28
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Yeah that's installed.
     
  2. Rob

    Rob Active Member

    Joined:
    Feb 17, 2015
    Messages:
    404
    Likes Received:
    99
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    That error is to do with resque which is a yii library in MW, @twisted1919 can you help out?
     
  3. Michael Wilding

    Michael Wilding Active Member

    Joined:
    Apr 28, 2015
    Messages:
    260
    Likes Received:
    28
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    While we're waiting for @twisted1919, @Rob do you know whether I'm okay to leave the server set to send using the Redis queue?

    I'm assuming not because although the test emails we're doing are showing as having been sent, we're not receiving them so I assume they're sitting in a Redis queue and not being processed because the daemon isn't running?
     
  4. Rob

    Rob Active Member

    Joined:
    Feb 17, 2015
    Messages:
    404
    Likes Received:
    99
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Sorry bud I was out. You won't be able to use the queue without the daemon running as you say. Did you try starting with debug

    /usr/bin/php -q /absolute/path/to/apps/console/console.php queue --workers=10 --interval=5 --verbose=1
     
  5. Michael Wilding

    Michael Wilding Active Member

    Joined:
    Apr 28, 2015
    Messages:
    260
    Likes Received:
    28
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Debug is what I've been trying to run in with the same issue :(
     
  6. Rob

    Rob Active Member

    Joined:
    Feb 17, 2015
    Messages:
    404
    Likes Received:
    99
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Ah OK, one thing I did find was that I couldn't get it to run with PHP 5.5.9 so I upgraded to PHP 5.6. I don't know if it's all 5.5 versions but you might want to look at it if you are using that version.
     
  7. Michael Wilding

    Michael Wilding Active Member

    Joined:
    Apr 28, 2015
    Messages:
    260
    Likes Received:
    28
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Ah that could be it. I will look at getting that upgraded.
     
  8. Michael Wilding

    Michael Wilding Active Member

    Joined:
    Apr 28, 2015
    Messages:
    260
    Likes Received:
    28
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Upgraded to 5.6 but still getting:
    Could not fork worker 0
     
  9. Rob

    Rob Active Member

    Joined:
    Feb 17, 2015
    Messages:
    404
    Likes Received:
    99
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Do you get anything if you run this
    ps aux | grep queue
     
  10. Rob

    Rob Active Member

    Joined:
    Feb 17, 2015
    Messages:
    404
    Likes Received:
    99
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
  11. Rob

    Rob Active Member

    Joined:
    Feb 17, 2015
    Messages:
    404
    Likes Received:
    99
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
  12. Michael Wilding

    Michael Wilding Active Member

    Joined:
    Apr 28, 2015
    Messages:
    260
    Likes Received:
    28
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Yes, if I do that I get:

    root 404 0.0 0.0 0 0 ? S< May01 0:00 [cqueue/0]

    root 405 0.0 0.0 0 0 ? S< May01 0:00 [cqueue/1]

    root 406 0.0 0.0 0 0 ? S< May01 0:00 [cqueue/2]

    root 407 0.0 0.0 0 0 ? S< May01 0:00 [cqueue/3]

    root 408 0.0 0.0 0 0 ? S< May01 0:00 [cqueue/4]

    root 409 0.0 0.0 0 0 ? S< May01 0:00 [cqueue/5]

    root 410 0.0 0.0 0 0 ? S< May01 0:00 [cqueue/6]

    root 411 0.0 0.0 0 0 ? S< May01 0:00 [cqueue/7]

    root 412 0.0 0.0 0 0 ? S< May01 0:00 [cqueue/8]

    root 413 0.0 0.0 0 0 ? S< May01 0:00 [cqueue/9]

    root 414 0.0 0.0 0 0 ? S< May01 0:00 [cqueue/10]

    root 415 0.0 0.0 0 0 ? S< May01 0:00 [cqueue/11]

    root 6289 0.0 0.0 36056 6948 ? S May01 0:00 queueprocd - wait to process a task

    518 13625 0.0 0.0 61184 808 pts/0 S+ 12:21 0:00 grep queue
     
  13. Michael Wilding

    Michael Wilding Active Member

    Joined:
    Apr 28, 2015
    Messages:
    260
    Likes Received:
    28
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Shall check for PCNTL
     
  14. Michael Wilding

    Michael Wilding Active Member

    Joined:
    Apr 28, 2015
    Messages:
    260
    Likes Received:
    28
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Thanks Rob enabling that seems to have resolved the issue :)
     
  15. Rob

    Rob Active Member

    Joined:
    Feb 17, 2015
    Messages:
    404
    Likes Received:
    99
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Brilliant, I really should have remembered that. sorry fella.
     
  16. Michael Wilding

    Michael Wilding Active Member

    Joined:
    Apr 28, 2015
    Messages:
    260
    Likes Received:
    28
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Thanks for all the help. I'm still having difficulties with the Redis queue. Everything seems to just get stuck in pending and never sent when I use it. Looks like I'll need to get one of you guys to set it up correctly for me at some point, does anybody offer that?

    In the meantime normal send is actually going pretty fast.
     
    Jose Vega likes this.
  17. Rob

    Rob Active Member

    Joined:
    Feb 17, 2015
    Messages:
    404
    Likes Received:
    99
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Are the emails actually being sent to redis and then not being picked up for sending or are they not reaching redis at all?
     
  18. Michael Wilding

    Michael Wilding Active Member

    Joined:
    Apr 28, 2015
    Messages:
    260
    Likes Received:
    28
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Pretty sure it's not even sending to Redis tbh.
     
  19. Rob

    Rob Active Member

    Joined:
    Feb 17, 2015
    Messages:
    404
    Likes Received:
    99
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    You can see if the worker queues were setup with redis-cli monitor:
    redis-cli monitor
    http://redis.io/commands/monitor

    If the queues were created you should see something similar to:

    "LPOP" "fac7b0bae8:queue:emails-queue"

    You can also use www.redsmin.com for free for one redis server which will give you a GUI into what is happening on your redis server.
     
  20. Michael Wilding

    Michael Wilding Active Member

    Joined:
    Apr 28, 2015
    Messages:
    260
    Likes Received:
    28
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Thanks Rob, I'll take a look at it.
     

Share This Page