docker-archive / docker-registry

This is **DEPRECATED**! Please go to https://github.com/docker/distribution
Apache License 2.0
2.88k stars 877 forks source link

Failed to push big image to docker registry. #1015

Closed xiakunhou closed 9 years ago

xiakunhou commented 9 years ago

I am pushing a big images (97G) to docker registry, after some hours the push process is stopped. Anyone met this problem?

25/Jun/2015:09:28:09 +0000 WARNING: Cache storage disabled!
25/Jun/2015:09:28:09 +0000 WARNING: LRU cache disabled!
25/Jun/2015:09:28:09 +0000 WARNING: Cache storage disabled!
25/Jun/2015:09:28:09 +0000 WARNING: LRU cache disabled!
25/Jun/2015:09:28:09 +0000 DEBUG: Will return docker-registry.drivers.file.Storage
25/Jun/2015:09:28:09 +0000 DEBUG: Will return docker-registry.drivers.file.Storage
[2015-06-25 09:28:09 +0000] [30] [ERROR] Exception in worker process:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 507, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py", line 193, in init_process
    super(GeventWorker, self).init_process()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 114, in init_process
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 66, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 356, in import_app
    __import__(module)
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/wsgi.py", line 27, in <module>
    from .search import *  # noqa
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/search.py", line 14, in <module>
    INDEX = index.load(cfg.search_backend.lower())
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/lib/index/__init__.py", line 82, in load
    return db.SQLAlchemyIndex()
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/lib/index/db.py", line 86, in __init__
    self._setup_database()
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/toolkit.py", line 330, in wrapper
    os.remove(lock_path)
OSError: [Errno 2] No such file or directory: './registry._setup_database.lock'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 507, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py", line 193, in init_process
    super(GeventWorker, self).init_process()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 114, in init_process
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 66, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 356, in import_app
    __import__(module)
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/wsgi.py", line 27, in <module>
    from .search import *  # noqa
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/search.py", line 14, in <module>
    INDEX = index.load(cfg.search_backend.lower())
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/lib/index/__init__.py", line 82, in load
    return db.SQLAlchemyIndex()
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/lib/index/db.py", line 86, in __init__
    self._setup_database()
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/toolkit.py", line 330, in wrapper
    os.remove(lock_path)
OSError: [Errno 2] No such file or directory: './registry._setup_database.lock'
[2015-06-25 09:28:09 +0000] [30] [INFO] Worker exiting (pid: 30)
[2015-06-25 09:28:10 +0000] [25] [INFO] Worker exiting (pid: 25)
[2015-06-25 09:28:10 +0000] [31] [INFO] Worker exiting (pid: 31)
[2015-06-25 10:27:05 +0000] [19] [WARNING] Worker graceful timeout (pid:19)
[2015-06-25 10:27:07 +0000] [19] [INFO] Worker exiting (pid: 19)
[2015-06-25 10:27:07 +0000] [1] [INFO] Shutting down: Master
[2015-06-25 10:27:07 +0000] [1] [INFO] Reason: Worker failed to boot
xiakunhou commented 9 years ago
Jun 26 03:45:06 docker-registry1 docker: Failed to upload layer: Put http://docker-registry1:5000/v1/images/b36f572eda3e885f7d3dddf8e42b3efa65f7459c1672fdf49770cf8887896709/layer: write tcp 10.27.20.78:5000: connection reset by peer
xiakunhou commented 9 years ago

Increase socket timeout solve my problem. Inside boto.cfg

[Boto]
http_socket_timeout = 60

Refer to https://github.com/docker/docker-registry/issues/540