# Onedrive gateway timeout error

**URL:** <https://forum.rclone.org/t/onedrive-gateway-timeout-error/33313>\
**Category:** Suspected Bug\
**Created:** [September 29, 2022, 5:56pm UTC](https://forum.rclone.org/t/onedrive-gateway-timeout-error/33313 "2022-09-29T17:56:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![andersonjacob](https://forum.rclone.org/user_avatar/forum.rclone.org/andersonjacob/32/13156_2.png) [@andersonjacob](https://forum.rclone.org/u/andersonjacob)\
**Post date:** [September 29, 2022, 5:56pm UTC](https://forum.rclone.org/t/onedrive-gateway-timeout-error/33313/1 "2022-09-29T17:56:17Z")

</div>

#### What is the problem you are having with rclone?

It started with errors when running a `sync` command that it could not list the contents of a directory. So I tried just the `lsf` command to see if I could get something. It isn't working and it gives an `UnknownError:`. I tried decreasing the chunk-size and transfers to their lowest to get things to work but no luck. [This post may be related](https://forum.rclone.org/t/error-reading-destination-directory/7316), but I'm not sure and I couldn't find a resolution in that one either.

This isn't an especially large directory is has 842 files in it all told about 27 MB of data. It was working just two weeks ago. I don't know what may have changed. I am able to read/write lots of other files and directories on this same onedrive share without any problems. It is just a couple of directories that are giving me a problem. I kind of suspect that it could be a problem on the microsoft side of things, but I can't be sure. I can download these files through the onedrive web interface without any problems. So I'm stumped.

#### Run the command 'rclone version' and share the full output of the command.

```auto
rclone v1.59.2
- os/version: scientific 7.8 (64 bit)
- os/kernel: 3.10.0-1160.76.1.el7.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.18.6
- go/linking: static
- go/tags: none

```

#### Which cloud storage system are you using? (eg Google Drive)

OneDrive

#### The command you were trying to run (eg `rclone copy /tmp remote:tmp`)

```auto
rclone lsf --transfers 1 --onedrive-chunk-size 320Ki "Cirrus-OneDrive:Battery_Data/Cirrus_data/UCCS/Q2_data_dump/Cirrus Q2 F1 Files/Data/PULSEData/P25/IFIX11_PULSE_P25_Z40/" --retries 1 --low-level-retries 2 -vv --dump bodies

```

#### The rclone config contents with secrets removed.

```auto
$ cat ~/.config/rclone/rclone.conf 
[Cirrus-OneDrive]
type = onedrive
drive_type = business
link_scope = organization
token = {"access_token":"...","token_type":"Bearer","refresh_token":"...","expiry":"..."}
drive_id = ...

```

#### A log from the command with the `-vv` flag

[gist log](https://gist.github.com/andersonjacob/b4dbed5cc7924964289011020e8486a6)

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [September 29, 2022, 6:10pm UTC](https://forum.rclone.org/t/onedrive-gateway-timeout-error/33313/2 "2022-09-29T18:10:24Z")

</div>

hello and welcome to the forum,

> [@andersonjacob](#):
>
> I tried just the `lsf` command to see if I could get something. It isn't working and it gives an `UnknownError:`. I tried decreasing the chunk-size and transfers to their lowest to get things to work

those flags should not affect `rclone lsf`, as that list files, does not transfer them,

and from that link you shared

> [@Error reading destination directory](https://forum.rclone.org/t/error-reading-destination-directory/7316/5):
>
> `--onedrive-list-chunk` - the default is 1000 - can you try the `lsf` again with this parameter - try halving each time from 1000 until it works. It may not work at all, but it may help!

so i think your command should have been  
`rclone lsf --onedrive-list-chunk`, not `rclone lsf --onedrive-chunk-size`

as a test, i might create a new dir and copy the files into the new dir.  
and then run `rclone ls` on that new dir.  
and if that works, try `rclone copy/sync`

---

<div class="post-metadata">

**Author:** ![andersonjacob](https://forum.rclone.org/user_avatar/forum.rclone.org/andersonjacob/32/13156_2.png) [@andersonjacob](https://forum.rclone.org/u/andersonjacob)\
**Post date:** [September 29, 2022, 7:20pm UTC](https://forum.rclone.org/t/onedrive-gateway-timeout-error/33313/3 "2022-09-29T19:20:26Z")

</div>

Thanks. Moving the list chunk down to 500 lets the `lsf` complete. I'm going to see if that flag will help the `sync` command.

I guess I didn't try that before because it didn't work in the other case. I have some hope now that this might fix it.

---

<div class="post-metadata">

**Author:** ![andersonjacob](https://forum.rclone.org/user_avatar/forum.rclone.org/andersonjacob/32/13156_2.png) [@andersonjacob](https://forum.rclone.org/u/andersonjacob)\
**Post date:** [September 29, 2022, 7:42pm UTC](https://forum.rclone.org/t/onedrive-gateway-timeout-error/33313/4 "2022-09-29T19:42:03Z")

</div>

> [@asdffdsa](#):
>
> > [@andersonjacob](#):
> >
> > I tried just the `lsf` command to see if I could get something. It isn't working and it gives an `UnknownError:`. I tried decreasing the chunk-size and transfers to their lowest to get things to work
> 
> those flags should not affect `rclone lsf`, as that list files, does not transfer them,

I gave those a try because the error message suggested them:

```auto
ERROR : UnknownError: : upload chunks may be taking too long - try reducing --onedrive-chunk-size or decreasing --transfers

```

Good to know that they aren't going to affect this particular operation.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [September 29, 2022, 7:45pm UTC](https://forum.rclone.org/t/onedrive-gateway-timeout-error/33313/5 "2022-09-29T19:45:37Z")

</div>

> [@andersonjacob](#):
>
> I gave those a try because the error message suggested them:

yeah, that is most confusing.  
at first, i also missed that. had to do a second read.

so, the `rclone sync` worked this time?

---

<div class="post-metadata">

**Author:** ![andersonjacob](https://forum.rclone.org/user_avatar/forum.rclone.org/andersonjacob/32/13156_2.png) [@andersonjacob](https://forum.rclone.org/u/andersonjacob)\
**Post date:** [September 29, 2022, 7:47pm UTC](https://forum.rclone.org/t/onedrive-gateway-timeout-error/33313/6 "2022-09-29T19:47:13Z")

</div>

It is still running. It isn't the fastest thing ever. I'll report back as soon as it finishes (or doesn't).

---

<div class="post-metadata">

**Author:** ![andersonjacob](https://forum.rclone.org/user_avatar/forum.rclone.org/andersonjacob/32/13156_2.png) [@andersonjacob](https://forum.rclone.org/u/andersonjacob)\
**Post date:** [September 29, 2022, 9:47pm UTC](https://forum.rclone.org/t/onedrive-gateway-timeout-error/33313/7 "2022-09-29T21:47:16Z")

</div>

After decreasing the `--onedrive-list-chunk` from its default of 1000 to 500. My `lsf` and `sync` operations successfully ran to completion.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [September 29, 2022, 10:07pm UTC](https://forum.rclone.org/t/onedrive-gateway-timeout-error/33313/8 "2022-09-29T22:07:36Z")

</div>

all right, good to know,

in the end, tweaking `--onedrive-list-chunk` solved the `UnknownError` problem.

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [October 2, 2022, 10:07pm UTC](https://forum.rclone.org/t/onedrive-gateway-timeout-error/33313/9 "2022-10-02T22:07:45Z")

</div>

Closed on October 2, 2022, 10:07pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
