Debug send-campaigns command

Debug send-campaigns command

Starting with version 1.3.5, the cron job command that sends campaigns (send-campaigns) has been modified so that it will help debugging sending speed. In order to make use of this functionality, you should have ssh access to your server so that you can run some commands in order to see the debug info directly in your ssh terminal.

First step is to disable the cron job that triggers the send-campaigns command, the one that runs each minute. This is very important, so please make sure you do it.
Once that cron job is disabled, it means we need to trigger campaigns sending manually from command line. In order to do this, if your cron job for send-campaigns looks like:

/usr/bin/php -q /var/www/html/apps/console/console.php send-campaigns >/dev/null 2>&1

Then you need to run the following command from command line:

/usr/bin/php -q /var/www/html/apps/console/console.php send-campaigns --verbose=1

Basically, you just remove:

>/dev/null 2>&1

and you add:

--verbose=1

Once you run the above command in your ssh terminal, you will notice that AppMail will start outputting information about what it is currently doing and the time it takes for each task. Identify the task that takes longest time, and you will find out what your sending problem is.
Once you know the problem and you have fixed it, you should enable the send-campaigns cron jobs so that sending campaigns resumes.

    • Related Articles

    • Delete campaigns command

      Deleting old campaigns, that you don't need anymore, will free up a lot of disk space. This in turn will result in a faster application because there will be less data AppMail has to go through in order to complete operations. The delete-campaigns ...
    • My campaigns don’t send, they’re stuck in “Pending-Sending” status

      When this happens, most likely the cron jobs that must run in order to pick up the campaigns and send them are not running, and no, it’s not something wrong with the application, but you simply need to feed the application with the right data in ...
    • How do I send campaigns with attachments?

      In order to send campaigns with attachments, you first have to enable and configure the feature. To do this, you go to Backend > Settings > Campaigns and enable the feature, but also in same screen, you configure what files are allowed to be ...
    • Process regular campaigns and autoresponders separately

      By default, AppMail will process both, regular campaigns and autoresponders in the same time. This is good for small installations that don’t have multiple campaigns that are sending at once. If the “Campaigns at once” setting from Backend -> ...
    • Recurring Campaigns

      One great feature of AppMail is recurring campaigns, which means you can set it in a way that every 10th of each month you could send an RSS FEED campaign with latest blog posts. But this is not all, you can even set it to send in various days of the ...