I use the migrate module to import data from ATDW(Australian Tourism Data Warehouse). However, the migration process often fails during the image uploading process.

I was running the migration process through Drush: drush.php migrate:import --group warehouse_data --update --sync

The migrate shows the below error message

Server error: `GET https://assets.atdw-online.com.au/images/034004635bfc9018f4a81e266f008f9...` resulted in a `524 Origin Time-out` response (https://assets.atdw-online.com.au/images/034004635bfc9018f4a81e266f008f9...)

Cloudflare successfully connected to the origin web server, but the origin did not provide an HTTP response before the default 100 second connection timed out.

I can fix this issue by running the migration couple of times but I think it is better to have a workaround such as skipping or retrying if an image fails?

Comments

goyote created an issue. See original summary.

quietone’s picture

Category: Bug report » Feature request
Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)
Issue tags: -Needs work

@goyote, please add the yml for the migration that is failing. And are you using migrate_tools with configured migrations? Is the process using the Download process plugin? Thanks.

This doesn't seem like a bug, at least not yet, so changing to a Feature Request due to the ideas in the proposed resolution.

goyote’s picture

Sorry I forgot to put the YML and XML files.


id: restaurant 
label: XML feed of Restaurants  
migration_group: warehouse_data 
source:
  plugin: url
  data_fetcher_plugin: http  
  data_parser_plugin: xml
  urls: 'https://atlas.atdw-online.com.au/api/atlas/products?key=xxx' 
  item_selector: /atdw_search_response/products/product_record 
  track_changes: true
  constants:
    file_destination: 'public://restaurant-images/'
    gallery_destination: 'public://event-gallery/'

  fields:
    name: product_image
    label: 'Product image'
    selector: product_image
process: 
  field_image:
    plugin: image_import
    source: '@change_image_qulity'   #replace url of the image to get better quality
    destination: 'constants/file_destination'
    title: product_name
    alt: product_name

  change_image_qulity:   #replace url of the image to get better quality
    plugin: str_replace  
    source: product_image
    search: w=280&h=210
    replace: 'w=1600&h=1200'

Jason file

<atdw_search_response>
  <status>0</status>
  <number_of_results>37</number_of_results>
  <query_time>10</query_time>
  <products>
    <product_record>
    <product_id>XXXXXXXXXXXXXXXXX</product_id>
    <product_number>AU0097070</product_number>
    <status>ACTIVE</status>
    <product_update_date>2020-07-01T01:01:32.931+10:00</product_update_date>
    <owning_organisation_id>XXXXXXXXXXXXXXX</owning_organisation_id>
    <owning_organisation_number>XXXXX</owning_organisation_number>
    <owning_organisation_name>XXX</owning_organisation_name>
    <product_name>Oaks Darwin Elan Hotel</product_name>
    <product_description>Blending contemporary apartment accommodation with resort-style leisure amenities, superior conferencing facilities and a convenient CBD location, Oaks Elan Darwin is the premier choice for business or pleasure. Located on Woods Street in Darwin's CBD, the hotel is just minutes from the Darwin Waterfront Precinct, Entertainment Centre and the city's dining, entertainment and shopping hub. Choose from stylish hotel rooms, studios or self-contained apartments in one and two bedroom configurations, featuring a kitchenette, laundry facilities, dedicated work desk with media station, air-conditioning, Wi-Fi access, Foxtel, on-demand movies, and private balcony overlooking the city, Darwin Harbour and Frances Bay. Oaks Elan Darwin also boasts a range of on-site leisure facilities, including an outdoor lap pool, well-equipped gymnasium and on-site restaurant 'The O.A.K.' Original Australian Kitchen, open daily for breakfast, lunch and dinner. Corporate guests will appreciate Oaks Elan Darwin's dedicated conference precinct, located on mezzanine level and featuring six separate event spaces available in a range of configurations. Oaks Elan Darwin is located just 17 minutes from the Darwin International Airport. It is also well placed for guests wanting to explore the Northern Territory's Top End. </product_description>
    <product_category_id>ACCOMM</product_category_id>
    <product_image>https://assets.atdw-online.com.au/images/034004635bfc9018f4a81e266f008f92.jpeg?rect=267,0,4190,3143&w=280&h=210&rot=360</product_image>
    <boundary>-12.4616347,130.84380750000003</boundary>
    <addresses>
      <address>
        <address_type>PHYSICAL</address_type>
        <address_line>31 Woods Street</address_line>
        <address_line2/>
        <city>Darwin City</city>
        <state>NT</state>
        <postcode>0800</postcode>
        <country>Australia</country>
        <area>Darwin Area</area>
        <region>Darwin & Surrounds</region>
      </address>
    </addresses>
    <next_occurrence/>
    <score>1</score>
    <product_pixel_url>https://atlas.atdw-online.com.au/pixel?productId=XXXXXXXXXXXXXXXXX&distributorId=XXXXXXXXXXXXX&language=en&syndicationMethod=API</product_pixel_url>
    </product_record>
  </products>
</atdw_search_response>
avpaderno’s picture

Assigned: goyote » Unassigned
Issue tags: -Needs work
avpaderno’s picture

Category: Feature request » Support request

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
cilefen’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

I am closing this support request because there have been no recent comments.

The Drupal Core issue queue is not the ideal place for support requests. Consider other sources of support.