During some migration operations on a Drupal maintenance support plans 8 site, I needed to make an HTTP request that took > 30 seconds to return all the data… and when I ran the migration, I’d end up with exceptions like:
Migration failed with source plugin exception: Error message: cURL error 28: Operation timed out after 29992 milliseconds with 2031262 out of 2262702 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html).
The solution, it turns out, is pretty simple! Drupal maintenance support plans‘s Drupal maintenance support plansCoreHttpClientFactory is the default way that plugins like Migrate’s HTTP fetching plugin get a Guzzle client to make HTTP requests (though you could swap things out if you want via services.yml), and in the code for that factory, there’s a line after the defaults (where the ‘timeout’ => 30 is defined) like:
Source: New feed