joeyates / imap-backup

Backup and Migrate IMAP Email Accounts
MIT License
1.33k stars 74 forks source link

Zabit (SIGKILL) #176

Closed michaldejmek closed 9 months ago

michaldejmek commented 9 months ago

Hello,

I'm migrating from one account to another that's on google. I understand that google has its limits, but why am I ending up with a "Killed (SIGKILL)" error.

imap-backup migrate aa@domain.xyz a.a@domain.xyz --destination-prefix=xxxx

WARN -- : [xxxx/Drafts] uid: 362975 (145/159) - append error: Message too large. https://support.google.com/mail/answer/6584#limit WARN -- : [xxxx/Drafts] uid: 372731 (155/159) - append error: Message too large. https://support.google.com/mail/answer/6584#limit Zabit (SIGKILL)

Thanks for the help.

joeyates commented 9 months ago

Hi @michaldejmek

I imagine that the SIGKILL is caused by an out of memory condition.

Is this backup running on a small device, e.g. a Raspberry Pi?

michaldejmek commented 9 months ago

Hi @joeyates

it's running in the virus server. 4 CPU / 4GB RAM

joeyates commented 9 months ago

How big are the messages that are filing to migrate?

michaldejmek commented 9 months ago

Ordinary emails occasionally some attachment .. When creating a backup it did not do. Now I've run it with the --verbose command

michaldejmek commented 9 months ago

@joeyates

The application only allocates memory but does not release it incrementally :(

image
joeyates commented 9 months ago

@michaldejmek

The application relinquishes memory occasionally, based on the default rules of the Ruby version you are using.

Are you able to ascertain how big these problematic messages are?

You have ≈1GB swap and ≈4GB of RAM. I think the best fix in this case is to increase the amount of swap available.

michaldejmek commented 9 months ago

@joeyates Created a swap of 80GB the clipboard has around 65GB.

ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux-gnu]

W, [2023-09-30T01:40:06.508228 #74602] WARN -- : [xx-xx-xx-xx/INBOX.Archives/2011] uid: 12180 (10661/10661) - append error: closed stream /usr/lib/ruby/3.1.0/openssl/buffering.rb:354:in syswrite': closed stream (IOError) from /usr/lib/ruby/3.1.0/openssl/buffering.rb:354:indo_write' from /usr/lib/ruby/3.1.0/openssl/buffering.rb:453:in print' from /var/lib/gems/3.1.0/gems/net-imap-0.3.7/lib/net/imap.rb:2239:input_string' from /var/lib/gems/3.1.0/gems/net-imap-0.3.7/lib/net/imap.rb:2211:in block in send_command' from /usr/lib/ruby/3.1.0/monitor.rb:202:insynchronize' from /usr/lib/ruby/3.1.0/monitor.rb:202:in mon_synchronize' from /var/lib/gems/3.1.0/gems/net-imap-0.3.7/lib/net/imap.rb:2206:insend_command' from /var/lib/gems/3.1.0/gems/net-imap-0.3.7/lib/net/imap.rb:1118:in block in examine' from /usr/lib/ruby/3.1.0/monitor.rb:202:insynchronize' from /usr/lib/ruby/3.1.0/monitor.rb:202:in mon_synchronize' from /var/lib/gems/3.1.0/gems/net-imap-0.3.7/lib/net/imap.rb:1116:inexamine' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/lib/imap/backup/client/default.rb:62:in examine' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/lib/imap/backup/client/automatic_login_wrapper.rb:23:inmethod_missing' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/lib/imap/backup/account/folder.rb:152:in examine' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/lib/imap/backup/account/folder.rb:35:inblock in exist?' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/lib/retry_on_error.rb:4:in retry_on_error' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/lib/imap/backup/account/folder.rb:34:inexist?' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/lib/imap/backup/account/folder.rb:43:in create' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/lib/imap/backup/migrator.rb:17:inrun' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/lib/imap/backup/cli/transfer.rb:53:in block in run' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/lib/imap/backup/cli/folder_enumerator.rb:34:inblock in each' from :220:in glob' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/lib/imap/backup/cli/folder_enumerator.rb:30:inglob' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/lib/imap/backup/cli/folder_enumerator.rb:30:in each' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/lib/imap/backup/cli/transfer.rb:50:inrun' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/lib/imap/backup/cli.rb:152:in migrate' from /var/lib/gems/3.1.0/gems/thor-1.2.2/lib/thor/command.rb:27:inrun' from /var/lib/gems/3.1.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in invoke_command' from /var/lib/gems/3.1.0/gems/thor-1.2.2/lib/thor.rb:392:indispatch' from /var/lib/gems/3.1.0/gems/thor-1.2.2/lib/thor/base.rb:485:in start' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/lib/imap/backup/cli.rb:65:instart' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/bin/imap-backup:12:in block in <top (required)>' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/lib/imap/backup/logger.rb:41:insanitize_stderr' from /var/lib/gems/3.1.0/gems/imap-backup-12.1.0/bin/imap-backup:11:in <top (required)>' from /usr/local/bin/imap-backup:25:inload' from /usr/local/bin/imap-backup:25:in `

'

joeyates commented 9 months ago

@michaldejmek

So, there's no more SIGKILL, just the impossibility of appending messages over a certain size (which depends on the server configuration). I think we can close this issue.