# Xbcloud get from azure starts timing out after some data transferred

**URL:** <https://forums.percona.com/t/xbcloud-get-from-azure-starts-timing-out-after-some-data-transferred/24856>\
**Category:** Percona XtraBackup\
**Created:** [August 31, 2023, 8:39pm UTC](https://forums.percona.com/t/xbcloud-get-from-azure-starts-timing-out-after-some-data-transferred/24856 "2023-08-31T20:39:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardmarlow](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@richardmarlow](https://forums.percona.com/u/richardmarlow)\
**Post date:** [August 31, 2023, 8:39pm UTC](https://forums.percona.com/t/xbcloud-get-from-azure-starts-timing-out-after-some-data-transferred/24856/1 "2023-08-31T20:39:23Z")

</div>

I have a scheduled backup of a Percona MySQL 8.0 database for my UAT environment on Azure Blob Storage. I am attempting to restore one of these backups to a VM at GCP (Google Cloud Platform). All of the prerequisites to do this are complete.

I am running the following command on the VM command line to restore the backup:

xbcloud get azure-uat-20230830-b --azure-storage-account=backupuat --azure-access-key=Bej…vQ== --azure-container-name=backupsuat --max-backoff=300000 --max-retries=30 --storage=azure 2\>download.log | xbstream -x -C /var/lib/mysql/

The first time I did this it completed but I forgot to pipe to xbstream so I tried again. The second time I ran the command it got 92GB (out of about 120) into the restore and then threw a timeout error. The third time it got 80GB into the restore before erroring. The last attempt was 16GB before the same error.

My first thought was it is something at Azure throttling how much data I can download in a time period. I’ve searched for documentation and cannot find anything that suggests this is happening.

Here is a tail of download.log that shows some files downloaded successfully and the timeout:

````auto
root@db-sandbox:/var/lib/mysql# tail -f download.log
230831 20:23:14 xbcloud: [0] Download successfull azure-uat-20230830-b/listings/media_20230104.ibd.00000000000000000523, size 10485821
230831 20:23:14 xbcloud: [0] Downloading azure-uat-20230830-b/listings/media_20230104.ibd.00000000000000000524.
230831 20:23:14 xbcloud: [0] Download successfull azure-uat-20230830-b/listings/media_20230104.ibd.00000000000000000524, size 10485821
230831 20:23:14 xbcloud: [0] Downloading azure-uat-20230830-b/listings/media_20230104.ibd.00000000000000000525.
230831 20:23:15 xbcloud: [0] Download successfull azure-uat-20230830-b/listings/media_20230104.ibd.00000000000000000525, size 10485821
230831 20:23:15 xbcloud: [0] Downloading azure-uat-20230830-b/listings/media_20230104.ibd.00000000000000000526.
230831 20:23:15 xbcloud: [0] Download successfull azure-uat-20230830-b/listings/media_20230104.ibd.00000000000000000526, size 10485821
230831 20:23:15 xbcloud: [0] Downloading azure-uat-20230830-b/listings/media_20230104.ibd.00000000000000000527.
230831 20:23:16 xbcloud: [0] Download successfull azure-uat-20230830-b/listings/media_20230104.ibd.00000000000000000527, size 10485821
230831 20:23:16 xbcloud: [0] Downloading azure-uat-20230830-b/listings/media_20230104.ibd.00000000000000000528.
230831 20:25:16 xbcloud: Operation failed. Error: Timeout was reached
230831 20:25:16 xbcloud: Sleeping for 2384 ms before retrying azure-uat-20230830-b/listings/media_20230104.ibd.00000000000000000528 [1]
230831 20:25:19 xbcloud: [0] Download failed. Cannot download azure-uat-20230830-b/listings/media_20230104.ibd.00000000000000000528.
230831 20:25:19 xbcloud: Download failed.```
````

---

<div class="post-metadata">

**Author:** ![satya.bodapati](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/satya.bodapati/32/1322_2.png) [@satya.bodapati](https://forums.percona.com/u/satya.bodapati)\
**Post date:** [September 1, 2023, 12:11pm UTC](https://forums.percona.com/t/xbcloud-get-from-azure-starts-timing-out-after-some-data-transferred/24856/2 "2023-09-01T12:11:20Z")

</div>

> [@richardmarlow](#):
>
> `10485821`

Hi Richard,  
I have a few questions

1. Can you please get the xbcloud version ?
2. Are you able to download successfully with older versions?
3. What is the size of media\_2023104.ibd file? (If you have access to the database)

---

<div class="post-metadata">

**Author:** ![richardmarlow](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@richardmarlow](https://forums.percona.com/u/richardmarlow)\
**Post date:** [September 1, 2023, 12:41pm UTC](https://forums.percona.com/t/xbcloud-get-from-azure-starts-timing-out-after-some-data-transferred/24856/3 "2023-09-01T12:41:17Z")

</div>

xbcloud Ver 8.0.34-29 for Linux (x86\_64) (revision id: 5ba706ee)

I have not tried with any other version of xbcloud

It fails on different files each time when trying to restore.

In the Azure storage account, media\_20230104.ibd.00000000000000000528 shows that it is 10MiB

media\_20230104.ibd in the database it was backed up from is 16294871040 bytes on disk, roughly 16GB

---

<div class="post-metadata">

**Author:** ![satya.bodapati](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/satya.bodapati/32/1322_2.png) [@satya.bodapati](https://forums.percona.com/u/satya.bodapati)\
**Post date:** [September 1, 2023, 1:13pm UTC](https://forums.percona.com/t/xbcloud-get-from-azure-starts-timing-out-after-some-data-transferred/24856/4 "2023-09-01T13:13:44Z")

</div>

We have introduced timeout in 8.0.34 [PXB-3073](https://jira.percona.com/browse/PXB-3073): An unresponsive host may cause `xbcloud` to become stuck. Added a `--timeout` option to `xbcloud`.

can you please try with xbcloud 8.0.33?

Right, each file is divided into chunks of 10MB. And 16G is not too big.

---

<div class="post-metadata">

**Author:** ![satya.bodapati](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/satya.bodapati/32/1322_2.png) [@satya.bodapati](https://forums.percona.com/u/satya.bodapati)\
**Post date:** [September 1, 2023, 1:15pm UTC](https://forums.percona.com/t/xbcloud-get-from-azure-starts-timing-out-after-some-data-transferred/24856/5 "2023-09-01T13:15:29Z")

</div>

Default timeout for reponse is 120 seconds, may be retry with larger timeout.

Please test and share your feedback.

---

<div class="post-metadata">

**Author:** ![richardmarlow](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@richardmarlow](https://forums.percona.com/u/richardmarlow)\
**Post date:** [September 1, 2023, 4:29pm UTC](https://forums.percona.com/t/xbcloud-get-from-azure-starts-timing-out-after-some-data-transferred/24856/6 "2023-09-01T16:29:02Z")

</div>

The --timeout option resolved the issue. I set it to --timeout=300 and the restore worked perfectly.  
Thank you for your help with this issue.

---

<div class="post-metadata">

**Author:** ![satya.bodapati](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/satya.bodapati/32/1322_2.png) [@satya.bodapati](https://forums.percona.com/u/satya.bodapati)\
**Post date:** [September 1, 2023, 6:34pm UTC](https://forums.percona.com/t/xbcloud-get-from-azure-starts-timing-out-after-some-data-transferred/24856/7 "2023-09-01T18:34:25Z")

</div>

@richardmarlow Glad to help. Thanks for verifying. We will check if we can increase the default timeout in the next release.
