Our a magento 2.2 site usually goes down for about 3 to 4 minutes after within every 4 or 5 hours, than goes up when cron scheduler finishes it job. In this database...
select count(status) from cron_schedule where status='pending'
...there are just over a thousand status pending records, the requests we are getting from our store server for pricing updates of products.
Following is the error comes on screen when site is down during execution of cron_scheduler .
Reason: Connection Timeout
Reason: HTTP 503 - Service Unavailable
Can anyone please assist us why it's happening and what will be best permanent solution of it, because right now we are using temporary solution by doing so...
delete from cron_schedule where scheduled_at < date_sub(now(), interval 1 hour);
Thanks