AJAX request times out after 1 minute

In the end I did rewrite it to handle the import in a scheduled job, which turned out to be a lot better.