Code Monkey home page Code Monkey logo

python-dblogger's People

Contributors

dunkelstern avatar

Stargazers

 avatar

Watchers

 avatar  avatar

python-dblogger's Issues

Error while logging

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"
    },
    // ...
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.