Emails sending very slow (300 per hour) after migrating to different server

Discussion in 'Common issues' started by Eric535, Apr 7, 2017.

  1. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,450
    Likes Received:
    2,432
    That is correct. So after you install with that one command, you will have a fresh version of the app that runs without issues but has no data in it. You then have to drop the app tables, all of them, and import your tables.

    Just keep in mind that the one command installer installs in a docker environment, so basically inside your vps you have a virtual machine that runs mailwizz, so all the commands have to run inside the virtual machine.
    After you login via ssh in your vps, you run: docker exec -it mailwizz /bin/bash and this logs you in inside the virtual machine where you can import the database. Once done, just type exit to logout from virtual machine and back to your vps.
    I know, it's a bit complicated if you never worked with docker before :-s
     
    Eric535 likes this.
  2. Eric535

    Eric535 Member

    Joined:
    Sep 22, 2016
    Messages:
    314
    Likes Received:
    16
    S.E:
    2020-04-07 11:56:57
    L.T:
    Regular
    L.C:
    6
    That sounds really cool. Im just starting to move around with my SSH and learning linux.

    Thanks for all your help. I will let you know when I move it over. This way you can transfer my license.
     
    twisted1919 likes this.
  3. Eric535

    Eric535 Member

    Joined:
    Sep 22, 2016
    Messages:
    314
    Likes Received:
    16
    S.E:
    2020-04-07 11:56:57
    L.T:
    Regular
    L.C:
    6
    ok. So i was able to install everything. Just cant figure out how to drop the tables and import my db. I google docker import db and couldnt not figure it out
     
  4. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,450
    Likes Received:
    2,432
    @Eric535 - There is no magic method, but it's a bit complicate to explain you. PM me with root login, i'll do it for you ;)
     
    Eric535 likes this.
  5. Eric535

    Eric535 Member

    Joined:
    Sep 22, 2016
    Messages:
    314
    Likes Received:
    16
    S.E:
    2020-04-07 11:56:57
    L.T:
    Regular
    L.C:
    6
    @twisted1919 I appreciate your help. Is your docker method faster than if I were to set it up myself on a droplet with the same specs you requested? Will the emails go faster. I feel bad for you having to do it and besides I have another client which I would probably go this route and transfer his over too and dont want to be a bother. I was logged in via cyberduck and was looking for your docker's working web root but I couldnt not find it. I did in fact however find it in terminal but I know I have to initiate the bash command to run it first. If I could load the phpmyadmin on to it I probably could do it like that.
     
  6. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,450
    Likes Received:
    2,432
    It's faster just in terms of setup. If you follow the tutorial from https://www.if-not-true-then-false.com/2011/install-nginx-php-fpm-on-fedora-centos-red-hat-rhel/ the you end up with a working install like the docker image will provide for you. The only gotcha is to select php 7.0 not php 7.1 because Yii has some issues with php 7.1.

    Run from ssh: "docker inspect mailwizz" this will show something like:
    Code:
    ...
    "Mounts": [
        {
            "Name": "fac362...80535",
            "Source": "/var/lib/docker/volumes/fac362...80535/_data",
            "Destination": "/webapp",
            "Driver": "local",
            "Mode": "",
            "RW": true,
            "Propagation": ""
        }
    ]
    ...
    
    The "Source" contains the path where mailwizz files are on your VPS and you can change them without getting in the docker container, so you could try throwing a phpmyadmin folder there and then access it and do your work.
     
  7. Eric535

    Eric535 Member

    Joined:
    Sep 22, 2016
    Messages:
    314
    Likes Received:
    16
    S.E:
    2020-04-07 11:56:57
    L.T:
    Regular
    L.C:
    6
    If it just helps me install it faster than Im good with just migrating it myself. I use server pilot and it give me different versions of php to install. I never install 7.1. Just the 7. The only thing is that serverpilot only lets me install to ubuntu not centos like your quick install
     
  8. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,450
    Likes Received:
    2,432
    Ubuntu will do it as well ;)
     
    Eric535 likes this.
  9. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,450
    Likes Received:
    2,432
  10. Eric535

    Eric535 Member

    Joined:
    Sep 22, 2016
    Messages:
    314
    Likes Received:
    16
    S.E:
    2020-04-07 11:56:57
    L.T:
    Regular
    L.C:
    6
    @twisted1919 Got my files over to a linode with no issue. All I have to now is install the cron jobs and move my license to that server. How do i go about each one? I saw a video you have but the quality is a little low. Where can I get those commands so that I can just paste them into the command line? Im in the backend in the /cron-jobs-list page and I see a bunch of them.
     
  11. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,450
    Likes Received:
    2,432
    Just copy those, one by one, and add them in your cron jobs, something like:
    Code:
    # copy existing crons to a file named mwcron
    crontab -l > mwcron
    
    # add all the cron jobs in that file
    echo "* * * * * /usr/bin/php -q /var/www/vhosts/domain.mailwizz.com/httpdocs/apps/console/console.php send-campaigns >/dev/null 2>&1" >> mwcron
    echo "*/2 * * * * /usr/bin/php -q /var/www/vhosts/domain.mailwizz.com/httpdocs/apps/console/console.php send-transactional-emails >/dev/null 2>&1" >> mwcron
    echo "*/10 * * * * /usr/bin/php -q /var/www/vhosts/domain.mailwizz.com/httpdocs/apps/console/console.php bounce-handler >/dev/null 2>&1" >> mwcron
    echo "*/20 * * * * /usr/bin/php -q /var/www/vhosts/domain.mailwizz.com/httpdocs/apps/console/console.php feedback-loop-handler >/dev/null 2>&1" >> mwcron
    echo "*/3 * * * * /usr/bin/php -q /var/www/vhosts/domain.mailwizz.com/httpdocs/apps/console/console.php process-delivery-and-bounce-log >/dev/null 2>&1" >> mwcron
    echo "0 * * * * /usr/bin/php -q /var/www/vhosts/domain.mailwizz.com/httpdocs/apps/console/console.php hourly >/dev/null 2>&1" >> mwcron
    echo "0 0 * * * /usr/bin/php -q /var/www/vhosts/domain.mailwizz.com/httpdocs/apps/console/console.php daily >/dev/null 2>&1" >> mwcron
    
    # add the file entries to the cronjob
    crontab mwcron
    
    # remove the file.
    rm mwcron
    
    (replace /usr/bin/php -q /var/www/vhosts/domain.mailwizz.com/httpdocs/apps/console/console.php with your own path)
     
    Last edited: Apr 19, 2017
    Eric535 likes this.
  12. Eric535

    Eric535 Member

    Joined:
    Sep 22, 2016
    Messages:
    314
    Likes Received:
    16
    S.E:
    2020-04-07 11:56:57
    L.T:
    Regular
    L.C:
    6

    Thanks. Is there anyway to check to make sure I did it right?
     
    Last edited by a moderator: Apr 19, 2017
  13. Eric535

    Eric535 Member

    Joined:
    Sep 22, 2016
    Messages:
    314
    Likes Received:
    16
    S.E:
    2020-04-07 11:56:57
    L.T:
    Regular
    L.C:
    6
    @twisted1919

    When i put the first line which is:
    crontab -l > mwcron

    I get the following error:
    no crontab for root
     
  14. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,450
    Likes Received:
    2,432
    It's fine, you can continue ;)
     
  15. Eric535

    Eric535 Member

    Joined:
    Sep 22, 2016
    Messages:
    314
    Likes Received:
    16
    S.E:
    2020-04-07 11:56:57
    L.T:
    Regular
    L.C:
    6
    Ok. So the first time I did it I got an error:
    errors in crontab file, can't install.

    So I noticed when I replace the path with mine it didnt change the feedback path. So instead I went to the backend and copied the crons from backend/index.php/misc/cron-jobs-list and I inserted echo" in front of them and " >> mwcron at the end of each line and got no error when I went to add the file entries.

    So how do I know now that installed them correctly? Where can I look?
     
  16. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,450
    Likes Received:
    2,432
    run this:
    Code:
    cat mwcron
    
    This will show us what's inside the mwcron file you created.
     
  17. Eric535

    Eric535 Member

    Joined:
    Sep 22, 2016
    Messages:
    314
    Likes Received:
    16
    S.E:
    2020-04-07 11:56:57
    L.T:
    Regular
    L.C:
    6
    I run that command it does nothing. I do see it in the directory though. See snap.
     

    Attached Files:

  18. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,450
    Likes Received:
    2,432
    It means the file is empty if you can't see a thing... Can you show in an image like above how exactly did you run the echo ""... commands ?
     
  19. Eric535

    Eric535 Member

    Joined:
    Sep 22, 2016
    Messages:
    314
    Likes Received:
    16
    S.E:
    2020-04-07 11:56:57
    L.T:
    Regular
    L.C:
    6
    @twisted1919
    Here you go. Could it be that I need to be in that directory when im running those commands?
     

    Attached Files:

  20. Eric535

    Eric535 Member

    Joined:
    Sep 22, 2016
    Messages:
    314
    Likes Received:
    16
    S.E:
    2020-04-07 11:56:57
    L.T:
    Regular
    L.C:
    6
    @twisted1919 Do i need to be in a certain directory when Im doing all these commands?
     

Share This Page