Skip to content

Error while logging #1

Description

@andrew8er

This is the output from anfema/lokato-cache-worker@5bb1bf5d9ad350f3c6d9080b65de4a966ba4ba34 (integration)

--- Logging error ---
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/cache-worker-v7-zHEPP/lib/python3.7/site-packages/dblogger/async_handler.py", line 203, in async_emit
    hostname_id=host.pk
  File "/root/.local/share/virtualenvs/cache-worker-v7-zHEPP/lib/python3.7/site-packages/dblogger/async_models/model.py", line 65, in create
    data = await db.fetchrow(sql, *values)
  File "/root/.local/share/virtualenvs/cache-worker-v7-zHEPP/lib/python3.7/site-packages/asyncpg/connection.py", line 454, in fetchrow
    self._check_open()
  File "/root/.local/share/virtualenvs/cache-worker-v7-zHEPP/lib/python3.7/site-packages/asyncpg/connection.py", line 1147, in _check_open
    raise exceptions.InterfaceError('connection is closed')
asyncpg.exceptions._base.InterfaceError: connection is closed
Call stack:
  File "worker.py", line 65, in <module>
    run_server(config)
  File "/app/cache-worker/server/__init__.py", line 166, in run_server
    loop.run_until_complete(task)
  File "/root/.local/share/virtualenvs/cache-worker-v7-zHEPP/lib/python3.7/site-packages/dblogger/async_handler.py", line 139, in log_emitter
    await self.async_emit(record)
  File "/root/.local/share/virtualenvs/cache-worker-v7-zHEPP/lib/python3.7/site-packages/dblogger/async_handler.py", line 221, in async_emit
    self.handleError(record)

Config:

{
    "db": {
        "default": {
            "dbname": "lokato",
            "host": "postgres",
            "password": "cache_worker",
            "pool": {
                "max": 20,
                "min": 5
            },
            "port": 5432,
            "user": "cache_worker"
        },
        "geocoder": {
            "dbname": "geocoder",
            "host": "postgres",
            "password": "geocoder",
            "pool": {
                "max": 20,
                "min": 5
            },
            "port": 5432,
            "user": "geocoder"
        },
        "privileged": {
            "dbname": "lokato",
            "host": "postgres",
            "password": "privileged",
            "pool": {
                "max": 10,
                "min": 2
            },
            "port": 5432,
            "user": "privileged"
        }
    },
    "environment": "integration",
    "logger": {
        "db": {
            "dbname": "journal",
            "host": "postgres",
            "password": "journal",
            "port": 5432,
            "user": "journal"
        },
        "level": "DEBUG",
        "name": "cache-worker"
    },
    // ...
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions