Frequent error emails

If you frequently receive error emails with the message "We perform a total of 3 attempts, please fix urgently avoid notification lost." your endpoint probably takes too long to respond (more that 3 seconds).

The best method would be for you to reduce the execution time to within 3 seconds.

If you can't have a run time of less than 3 seconds, a workaround is to continue the background process.
Here is a PHP and NodeJS example to respond to the webhook and continue your background processing:

// Place on the beginning of your PHP script
ignore_user_abort(true);//not required
echo 'ok'; 
header('Connection: close');
header('Content-Length: '.ob_get_length());

// Your code here'/my-endpoint', async function (req, res) {  
  var body = res.body;
  res.status(200).send({ success: true });
  await performComplexTasks(body);

async function performComplexTasks(body){
   // Your code here

Did this page help you?