Rclone sync hangs sometimes up

Sure, either use rclone mount or rclone rcd and use rclone rc to issue commands over the API.

The mega backend will not make more connection for each sync ?

It's what I understood from https://github.com/rclone/rclone/issues/3393

Once it has logged in, the backend downloads the state of all the objects into memory.

That makes it really inefficient for single use commands, but it works well for rclone mount or rclone rcd

Ok thanks.

I will try to do the same test I did for the megacmd issue.
Using rclone mount and du et du -sh on megacmd it just lock at a moment I will see if it work through.
If it work it mean it's sure that the issue is on the megacmd side.

I just need to disable the 2FA because I not think the go library support 2FA yet.

1 Like

I think I will need to wait a bit because I tried lsd to see if it' works first but maybe I triggered the block. I will make an update later.

$ rclone lsd mega:/ -vvv
2021/02/02 10:05:55 DEBUG : rclone: Version "v1.53.4" starting with parameters ["rclone" "lsd" "mega:/" "-vvv"]
2021/02/02 10:05:55 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2021/02/02 10:05:55 DEBUG : Creating backend with remote "mega:/"
2021/02/02 10:06:06 Failed to create file system for "mega:/": couldn't login: Try again

I did a new try with rclone mount and it looks like it was trying to login but maybe I have too much folders so it timed out

2021/02/02 10:37:28 DEBUG : *go-mega*: Retry API request 1/10: Post "https://g.api.mega.co.nz/cs?id=xxx&sid=xxx": net/http: timeout awaiting response headers

That is only a warning - it will retry hence the 1/10.

I didn't copy the others because it tried again and again but it didn't went through.

2021/02/02 10:32:28 DEBUG : Creating backend with remote "mega:/crypt-with-salt"
2021/02/02 10:37:28 DEBUG : *go-mega*: Retry API request 1/10: Post "https://g.api.mega.co.nz/cs?id=xxx&sid=xxx": net/http: timeout awaiting response headers
2021/02/02 10:37:28 DEBUG : *go-mega*: Retry API request 2/10: Try again
2021/02/02 10:37:28 DEBUG : *go-mega*: Retry API request 3/10: Try again
2021/02/02 10:37:28 DEBUG : *go-mega*: Retry API request 4/10: Try again
2021/02/02 10:37:29 DEBUG : *go-mega*: Retry API request 5/10: Try again
2021/02/02 10:37:29 DEBUG : *go-mega*: Retry API request 6/10: Try again
2021/02/02 10:37:29 DEBUG : *go-mega*: Retry API request 7/10: Try again
2021/02/02 10:37:30 DEBUG : *go-mega*: Retry API request 8/10: Try again
2021/02/02 10:37:31 DEBUG : *go-mega*: Retry API request 9/10: Try again
2021/02/02 10:37:34 DEBUG : *go-mega*: Retry API request 10/10: Try again
2021/02/02 10:37:39 DEBUG : Creating backend with remote "mega:/crypt-with-salt"
2021/02/02 10:37:39 DEBUG : *go-mega*: Retry API request 1/10: Try again
2021/02/02 10:37:39 DEBUG : *go-mega*: Retry API request 2/10: Try again
2021/02/02 10:37:39 DEBUG : *go-mega*: Retry API request 3/10: Try again
2021/02/02 10:37:39 DEBUG : *go-mega*: Retry API request 4/10: Try again
2021/02/02 10:37:39 DEBUG : *go-mega*: Retry API request 5/10: Try again
2021/02/02 10:37:40 DEBUG : *go-mega*: Retry API request 6/10: Try again
2021/02/02 10:37:40 DEBUG : *go-mega*: Retry API request 7/10: Try again
2021/02/02 10:37:41 DEBUG : *go-mega*: Retry API request 8/10: Try again
2021/02/02 10:37:42 DEBUG : *go-mega*: Retry API request 9/10: Try again
2021/02/02 10:37:45 DEBUG : *go-mega*: Retry API request 10/10: Try again
2021/02/02 10:37:50 Failed to create file system for "crypt-with-salt:/": failed to make remote "mega:/crypt-with-salt/" to wrap: couldn't login: Try again

:frowning:

Some people seem to get that behaviour with the mega backend and some don't - I really don't understand why though.

You could maybe try at different times of day?

I tried it right now and same issue. I will try later again but I think it's maybe because I have too much metadata and that it just timeout.

With megacmd I have like 300mb "node fetching". Maybe I could try the go library as standalone to see if I reproduce the same issue.

Edit:

I did a test with the go-mega library. Not sure I did it right but maybe it can help.
I replaced mega_test.go with https://gist.github.com/kadogo/d0d2fdebcc53e7bc7544fb2ceec2539e because I only wanted to test the login.

Output: https://gist.github.com/kadogo/31346839685c7f86d5ab1b3ba194b8cb

What's it's interesting, if I check my login history in mega I see a computer that is logged so I think that the logging went well but maybe what's next was too slow.

Ah, 300MB of nodes - that is a lot. Yes you definitely want to get rclone mount running and don't stop it.

That "Try again" message is from the mega API so if it is a timeout it isn't a simple HTTP timeout.

I wonder if the API is expecting the client to ask for the data in chunks or something like that.

Hmm...

If you want you can add -vv --dump bodies to the command. This will show the HTTP transactions and give you an idea of what is going on.

Don't post the initial login transaction as it has your password in in cleartext!

Thanks, I will give it a try in the day and make an update later.

Edit:

I just copy paste the last part that I think was "waiting" or maybe I didn't wait enough. (It's an older version of rclone because it's on my laptop I can upgrade if you think that maybe it's related).

2021/02/03 18:07:36 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2021/02/03 18:07:36 DEBUG : HTTP REQUEST (req 0xc000172000)
2021/02/03 18:07:36 DEBUG : POST /cs?id=xxx&sid=xxx-xxx HTTP/1.1
Host: g.api.mega.co.nz
User-Agent: rclone/v1.53.3
Content-Length: 17
Content-Type: application/json
Accept-Encoding: gzip

[{"a":"f","c":1}]
2021/02/03 18:07:36 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1 Like

Not related but i tried to use davfs with megacmd and I remark that it not hang but I have input/output errors when I try to access some directories.

The whole path is less than 500 chars so I not think it's a length issue but I see the files through rclone ncdu.

Little update about the megacmd issue someone got a similar issue and found more were it was related

1 Like

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