Project

Profile

Help

Issue #8672

Registry handler loses database connection

Added by ipanova@redhat.com 6 months ago. Updated 5 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 96
Quarter:

Description

 [2021-04-29 16:07:13 +0000] [50888] [ERROR] Error handling request
 Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/django/db/backends/base/base.py", line 235, in _cursor
    return self._prepare_cursor(self.create_cursor(name))
  File "/usr/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 223, in create_cursor
    cursor = self.connection.cursor()
 psycopg2.InterfaceError: connection already closed
 The above exception was the direct cause of the following exception:
 Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/lib64/python3.6/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/lib/python3.6/site-packages/pulp_container/app/registry.py", line 102, in get_tag
    distribution = self._match_distribution(path)
  File "/usr/lib/python3.6/site-packages/pulpcore/content/handler.py", line 182, in _match_distribution
    return cls.distribution_model.objects.get(base_path__in=base_paths)
  File "/usr/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 402, in get
    num = len(clone)
  File "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 256, in __len__
    self._fetch_all()
  File "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 1242, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 55, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
  File "/usr/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1140, in execute_sql
    cursor = self.connection.cursor()
  File "/usr/lib/python3.6/site-packages/django/db/backends/base/base.py", line 256, in cursor
    return self._cursor()
  File "/usr/lib/python3.6/site-packages/django/db/backends/base/base.py", line 235, in _cursor
    return self._prepare_cursor(self.create_cursor(name))
  File "/usr/lib/python3.6/site-packages/django/db/utils.py", line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/lib/python3.6/site-packages/django/db/backends/base/base.py", line 235, in _cursor
    return self._prepare_cursor(self.create_cursor(name))
  File "/usr/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 223, in create_cursor
    cursor = self.connection.cursor()
 django.db.utils.InterfaceError: connection already closed

Related issues

Related to Pulp - Issue #9276: Content app can have unusable/closed db connections in pulpcore 3.15/3.16POST<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Copied to Container Support - Backport #8685: Bakcport to 2.1: Registry handler loses database connectionCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Copied to Container Support - Backport #8697: Backport to 2.5: Registry handler loses database connectionCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 756432fa View on GitHub
Added by ipanova@redhat.com 6 months ago

Fixed "connection already closed" error in the Registry handler.

closes #8672

Revision 756432fa View on GitHub
Added by ipanova@redhat.com 6 months ago

Fixed "connection already closed" error in the Registry handler.

closes #8672

History

#1 Updated by ipanova@redhat.com 6 months ago

  • Project changed from Pulp to Container Support

#2 Updated by ipanova@redhat.com 6 months ago

  • Subject changed from Registry handler looses database connection to Registry handler loses database connection

#3 Updated by ipanova@redhat.com 6 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ipanova@redhat.com
  • Sprint set to Sprint 95

#4 Updated by pulpbot 6 months ago

  • Status changed from ASSIGNED to POST

#5 Updated by ipanova@redhat.com 6 months ago

  • Sprint/Milestone set to 2.6.0

#6 Updated by rchan 6 months ago

  • Sprint changed from Sprint 95 to Sprint 96

#7 Updated by ipanova@redhat.com 6 months ago

  • Copied to Backport #8685: Bakcport to 2.1: Registry handler loses database connection added

#8 Updated by ipanova@redhat.com 6 months ago

  • Status changed from POST to MODIFIED

#9 Updated by ipanova@redhat.com 6 months ago

  • Copied to Backport #8697: Backport to 2.5: Registry handler loses database connection added

#10 Updated by pulpbot 5 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

#11 Updated by ttereshc 2 months ago

  • Related to Issue #9276: Content app can have unusable/closed db connections in pulpcore 3.15/3.16 added

Please register to edit this issue

Also available in: Atom PDF