As I wrote, my shared server limits the execution time of PHP scripts to 120 seconds. When I don't limit the execution for xml sitemaps I get a "Gateway Timeout - The gateway did not receive a timely response from the upstream server or application.".
I thought limiting the execution time would be exactly for that case. How can I get the script to run on its own until it's finished?