I use cloudflare, and i notice that when i send POST request to php file with parameter ignore_user_abort(1), after some time (~40-50 sec) server return error. And it is normal, because the task in php very heavy, and it takes 10-15mins to execute. But problem is that after error, cloudflare try to repeat request. And i see that the php code starts to execute again and again until restarting php fpm service. I do the same request by ip address, in that case it is execute only one time, i mean it works correctly. It worked with cloudflare before, but there are several days that i faced with this error. I guess it is some option i have to switch off in cloudflare.
you should think about manually aborting the client connection -> this way you can respond ie with a Http status 202 (accepted, but still processing)
look here to close a connection early