Closed
Description
Sometimes application raise error.
At line https://github.com/prometheus/client_python/blob/master/prometheus_client/core.py#L361
Stacktrace (последний вызов снизу):
File "flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "flask/app.py", line 1473, in full_dispatch_request
rv = self.preprocess_request()
File "flask/app.py", line 1666, in preprocess_request
rv = func()
File "core/middleware.py", line 43, in before_request_middleware
metrics.requests_total.labels(env_role=metrics.APP_ENV_ROLE, method=request.method, url_rule=rule).inc()
File "prometheus_client/core.py", line 498, in labels
self._metrics[labelvalues] = self._wrappedClass(self._name, self._labelnames, labelvalues, **self._kwargs)
File "prometheus_client/core.py", line 599, in __init__
self._value = _ValueClass(self._type, name, name, labelnames, labelvalues)
File "prometheus_client/core.py", line 414, in __init__
files[file_prefix] = _MmapedDict(filename)
File "prometheus_client/core.py", line 335, in __init__
for key, _, pos in self._read_all_values():
File "prometheus_client/core.py", line 361, in _read_all_values
encoded = struct.unpack_from('{0}s'.format(encoded_len).encode(), self._m, pos)[0]
We run application via uwsgi:
[uwsgi]
chdir=/usr/src/app/
env = APP_ROLE=dev_uwsgi
wsgi-file = /usr/src/app/app.wsgi
master=True
vacuum=True
max-requests=5000
harakiri=120
post-buffering=65536
workers=16
listen=4000
# socket=0.0.0.0:8997
stats=/tmp/uwsgi-app.stats
logger=syslog:uwsgi_app_stage,local0
buffer-size=65536
http = 0.0.0.0:8051
Metadata
Metadata
Assignees
Labels
No labels