IMAP diagnostics
Connection reset by peer: the server closed the session silently
How it looks in the log
Error reading from socket: Connection reset by peerThe provider decided the request rate was too high and tore down the session without explanation. Classic throttling — the error describes the symptom, not the cause.
Causes, most likely first
- Request intensity too high; the provider is protecting its servers.
- Gmail can suspend IMAP for several hours after an aggressive download.
- Network interruption or an intermediate device timing out a long operation.
- Server-side memory pressure while handling a very large message.
How to fix it
- Just run the transfer again — the remainder is copied and nothing duplicates.
- If it keeps happening, pause for a few hours, especially with Gmail.
- Reduce speed and thread count.
- Exclude folders with very large attachments and move them in a separate pass.
FAQ
Common questions
Can messages be lost when the connection drops?
No. The transfer compares what already exists at the destination and copies only the remainder on the next run. An interrupted migration never means lost mail.
Other errors
Find out how big your mailbox is. It costs nothing.
Connect two servers, look at the size and decide. Or take the client and keep everything on your side.
Code on GitHub · built on imapsync · no sign-up