Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MemoryError not handled #185

Open
akuzminsky opened this issue Jun 3, 2019 · 0 comments
Open

MemoryError not handled #185

akuzminsky opened this issue Jun 3, 2019 · 0 comments

Comments

@akuzminsky
Copy link
Member

  • TwinDB Backup version: 2.18.1
  • Operating System: Ubuntu 16.04.2 LTS

Description

I tried to run twindb-backup on a t3.nano instance, and apparently 500MB is not enough to start it.

Instead of stack trace it should catch the exception and recommend how to enable swap or give minimal memory requirements.

What I Did

# free -m
              total        used        free      shared  buff/cache   available
Mem:            466         148         112           5         206         285
Swap:             0           0           0

# twindb-backup backup daily
Traceback (most recent call last):
  File "/usr/bin/twindb-backup", line 9, in <module>
    load_entry_point('twindb-backup==2.18.1', 'console_scripts', 'twindb-backup')()
  File "/opt/twindb-backup/embedded/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/opt/twindb-backup/embedded/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/opt/twindb-backup/embedded/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/twindb-backup/embedded/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/twindb-backup/embedded/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/opt/twindb-backup/embedded/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/twindb-backup/embedded/lib/python2.7/site-packages/twindb_backup/cli.py", line 127, in backup
    binlogs_only=binlogs_only
  File "/opt/twindb-backup/embedded/lib/python2.7/site-packages/twindb_backup/backup.py", line 382, in run_backup_job
    binlogs_only=binlogs_only
  File "/opt/twindb-backup/embedded/lib/python2.7/site-packages/twindb_backup/backup.py", line 320, in backup_everything
    backup_files(run_type, twindb_config)
  File "/opt/twindb-backup/embedded/lib/python2.7/site-packages/twindb_backup/backup.py", line 101, in backup_files
    _backup_stream(config, src, dst)
  File "/opt/twindb-backup/embedded/lib/python2.7/site-packages/twindb_backup/backup.py", line 84, in _backup_stream
    dst.save(stream, src.get_name())
  File "/opt/twindb-backup/embedded/lib/python2.7/site-packages/twindb_backup/destination/s3.py", line 371, in save
    ret = self._upload_object(file_obj, filepath)
  File "/opt/twindb-backup/embedded/lib/python2.7/site-packages/twindb_backup/destination/s3.py", line 469, in _upload_object
    Config=s3_transfer_config)
  File "/opt/twindb-backup/embedded/lib/python2.7/site-packages/boto3/s3/inject.py", line 539, in upload_fileobj
    return future.result()
  File "/opt/twindb-backup/embedded/lib/python2.7/site-packages/s3transfer/futures.py", line 106, in result
    return self._coordinator.result()
  File "/opt/twindb-backup/embedded/lib/python2.7/site-packages/s3transfer/futures.py", line 265, in result
    raise self._exception
MemoryError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant