Skip to content

uwsgi config "lazy-apps: yes" "should_start_http_server" return False #31

@xiecang

Description

@xiecang

"UWsgiPrometheusMetrics().should_start_http_server()" returns False when I set uwsgi's startup parameter "lazy-apps:yes".

How can I use it when setting "lazy-apps:yes" ?
uwsgi config:

uwsgi:
  wsgi: wsgi:app
  http-socket: 0.0.0.0:11010
  processes: 4
  threads: 16
  master: yes
  ignore-write-errors: yes
  ignore-sigpipe: yes
  die-on-term: yes
  wsgi-disable-file-wrapper: yes
  max-requests: 65535
  max-requests-delta: 1024
  log-prefix: uWSGI
  log-date: yes
  log-slow: 10000
  disable-logging: yes
  need-app: true
  reload-mercy: 1
#  lazy-apps: yes

code:

    from prometheus_flask_exporter.multiprocess import UWsgiPrometheusMetrics
    metrics = UWsgiPrometheusMetrics(app)
    metrics.start_http_server(9200, )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions