I have a webform that sends data to PHP script.

PHP script may take a while to process the data. What I want to do is to send raw data to database, then redirect the visitor to "thank you" page and then continue processing the data in background. Important thing is that the script must continue working even if the visitor closes "thank you" page.

Can you advise which solution should I look into?

P.S. I use nginx + php-fpm if that matters.

UPDATE. I've found info about using ignore\_user\_abort(true). Could this be the way to go?