If your cron job encounters timeout errors, there are 2 possible causes:

  1. The maximum execution time ("Timeout" row in our plans) in your easycron plan is too short. We recommend you to upgrade your plan to solve this kind of problems.
  2. You get enough execution time in your EasyCron plan, but your cron job fails after running a particular time (e.g. 60 seconds). You may need to adjust the timeout settings in either or both your web server (e.g. Nginx or Apache) and application (e.g. PHP).
If you're using Nginx as web server:

Edit your global (/etc/nginx/nginx.conf) or website-specific (/etc/nginx/sites-enabled/example.com.conf) Nginx configuration, change the fastcgi_read_timeout line to

fastcgi_read_timeout 1800;

If fastcgi_read_timeout doesn't exist, add it inside a http{..} section like:

http {
     fastcgi_read_timeout 1800;
}

1800 is the maximum allowed execution time (in seconds) of your cron job, change it to any value you want.

Reload Nginx to make the changes take effect:

sudo service nginx reload

or in Ubuntu:

sudo systemctl reload nginx
If you're using Apache as web server:

Change TimeOut seting in your httpd.conf (in server config or vhost config) to

TimeOut 1800

1800 is the maximum allowed execution time (in seconds) of your cron job, change it to any value you want.

Reload Nginx to make the changes take effect:

sudo service apache2 reload

or in Ubutun:

sudo systemctl reload apache2
To update your PHP timeout setting:

Edit PHP configuration file (some possible locations "/etc/php/VERSION/fpm/php.ini", "/home/username/etc/phpX/php.ini", etc.), change

max_execution_time = 30

to

max_execution_time = 1800

Reload your php-fpm if necessary:

sudo systemctl reload phpVERSION-fpm

For example, if you're using php 7.2, the command would be:

sudo systemctl reload php7.2-fpm

If you're using a shared hosting, please ask the hosting technician to do the setting updates for you.

Feel free to contact us if you need any further assistance.