Process campaigns using Redis Queue.

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

  1. Jose Vega

    Jose Vega Member

    Joined:
    May 19, 2015
    Messages:
    59
    Likes Received:
    9
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Hi @Michael Wilding I´ve just finished the set up of my mailwizz with normal sending. But now I need to face the next challenge, setting up redis. Did you find someone for hire to set up redis? I have no clue about redis and if I dont understand it quickly I´ll be needing someone... Thank you in advance...
     
  2. Michael Wilding

    Michael Wilding Active Member

    Joined:
    Apr 28, 2015
    Messages:
    260
    Likes Received:
    28
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Hi Jose, I never got Redis setup properly.
     
    Jose Vega likes this.
  3. Rob

    Rob Active Member

    Joined:
    Feb 17, 2015
    Messages:
    404
    Likes Received:
    99
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    I'm interested as to why not @Michael Wilding I can take a look if you like, might help with any future issues people have.
     
  4. Jose Vega

    Jose Vega Member

    Joined:
    May 19, 2015
    Messages:
    59
    Likes Received:
    9
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    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
    Thanks Jose, would definitely be interested. Rob thank you very much for the offer, we're actually working with @twisted1919 on something different at the moment due to the speed we're needing.
     
  6. Howard

    Howard Member

    Joined:
    Jan 26, 2015
    Messages:
    59
    Likes Received:
    4
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    hello, need help, i have successfully run redis on other server infact mailwizz can send it to the redis server but it seems that from redis server it cant send the emails. how would i know if the redis server is sending it or it just stuck there... i have redismon access.
    thanks
     
  7. Vroom

    Vroom Member

    Joined:
    May 27, 2015
    Messages:
    132
    Likes Received:
    12
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    I just installed redis and phpredis and am testing it. The sending seems to go very fast, but when I check my exim mail queue it isnt increasing at all. The mail queue is still empty. At this point I am still only 50% done sending the campaign.

    So how does this work? When do the messages get sent to the exim mail queue? Is there something I have to do to make this happen or will it be done automatically after the campaign finishes sending?
     
  8. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,289
    Likes Received:
    2,391
    @Howard / @Vroom - You also have to have php's pcntl extension enabled on your server and run the queue command provided by mailwizz:
    Code:
    /usr/bin/php -q /absolute/path/to/apps/console/console.php queue --workers=10 --interval=5 --verbose=0
    
     
  9. Vroom

    Vroom Member

    Joined:
    May 27, 2015
    Messages:
    132
    Likes Received:
    12
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Thanks, I didnt have the queue running properly. Now it is going and is running very fast.
     
  10. Vroom

    Vroom Member

    Joined:
    May 27, 2015
    Messages:
    132
    Likes Received:
    12
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Some feedback: I sent 216,000 messages in 52 minutes. Which would be around 250,000 messages per hour. Before I was getting 40,000 to 50,000 messages per hour.

    Server load went up to 16 while both the queues and send processes were running. Once the send process finished (with the queues still running) the server load reduced to around 11. Still all sites on the server were reachable so it wasn't that bad of performance hit compared to the increase in speed. Usual server load is around 1.5.
     
  11. SQLIK

    SQLIK Active Member

    Joined:
    Jan 18, 2015
    Messages:
    169
    Likes Received:
    60
    S.E:
    Expired
    L.T:
    Extended
    L.C:
    1
    Hey @twisted1919 - Is this command:
    Code:
    apps/console/commands/shell/send-parallel-campaigns
    generates any information/logs with the error, and if so, where to find them? Thx.
     
  12. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,289
    Likes Received:
    2,391
    @SQLIK - That command doesn't really crates any output. Why you need it ?
     
  13. bidorbuy

    bidorbuy Member

    Joined:
    Dec 8, 2015
    Messages:
    90
    Likes Received:
    57
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    6
    If I have a local Postfix (which relays into Port25), would Redis improve throughput or would you say that a local Postfix drop is just as fast?
     
  14. Mxyzptlk FishStix

    Mxyzptlk FishStix Member

    Joined:
    Oct 13, 2015
    Messages:
    83
    Likes Received:
    12
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Send straight to Postfix. Just make sure your queue is resting on a fast drive.
     
  15. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,289
    Likes Received:
    2,391
  16. Louis Nguyen

    Louis Nguyen New Member

    Joined:
    Jan 12, 2016
    Messages:
    22
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    If i install it i will add more cronjob like
    * * * * * /usr/bin/php -q /absolute/path/to/apps/console/console.php queue --workers=10 --interval=5 --verbose=0 >/dev/null 2>&1 &
    right ?

    I'm test and php_info() : pcntl Jason Greene, Arnaud Le Blanc
    but when run /usr/local/bin/php -q /home/liziema/public_html/send/apps/console/console.php queue --workers=10 --interval=5 --verbose=1 =>
    [emergency] [11:22:40 2016-01-12] Could not fork worker 0
     
    Last edited: Jan 12, 2016
  17. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,289
    Likes Received:
    2,391

    NOTE: Please do not rely on this functionality anymore. Starting with mailwizz 1.3.5.9 the send-campaigns command has been improved so much that there is no need for Redis or the like anymore so in the future we will remove redis from mailwizz entirely.
     
    Jatin Sahani likes this.
  18. Rodrigo Bustos

    Rodrigo Bustos New Member

    Joined:
    Jul 27, 2016
    Messages:
    5
    Likes Received:
    0
    S.E:
    2019-11-06 19:12:32
    L.T:
    Regular
    L.C:
    1
    https://kb.mailwizz.com/articles/using-redis-cache-mutexes/

    Redis is something functional today in mailwizz or not (ver: 1.7.5)? does it improve anything?
     
  19. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,289
    Likes Received:
    2,391
    You can use it for cache and mutexes like the above article says, with great performance improvements.
     
  20. Rodrigo Bustos

    Rodrigo Bustos New Member

    Joined:
    Jul 27, 2016
    Messages:
    5
    Likes Received:
    0
    S.E:
    2019-11-06 19:12:32
    L.T:
    Regular
    L.C:
    1
    Redis for Mutex generate duplicate emails. We ran several tests and all works fine with redis for cache but redis for mutex. (version 1.7.5) 100 batches/100 emails each
     
    Last edited: Apr 25, 2019

Share This Page