Skip to content

Collects overlimited uwsgi request

Notifications You must be signed in to change notification settings

pavelpatrin/uwsgi-runnings-collector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Collects overlimited uwsgi request

This extension allows to log via uwsgi metrics how many current active (not finished) requests exceeded some limit in seconds.

This is useful for early problems detection: something happens and requests hang in background.

Building extension

  1. Build uwsgi from sources or download uwsgi includes

  2. Compile collector shared library

gcc `./uwsgi --cflags` -std=c99 -shared -fPIC -o runnings_collector.so runnings_collector.c

Configuring uwsgi

  1. Append .so preload option to uwsgi config
uwsgi:
    dlopen: /home/vagrant/uwsgi/runnings_collector.so
  1. Configure new metrics in uwsgi config
uwsgi:
    metric: name=running.over_60s,collector=func,arg1=runnings_collector,arg2=60,freq=60
    metric: name=running.over_120s,collector=func,arg1=runnings_collector,arg2=120,freq=60
    metric: name=running.over_240s,collector=func,arg1=runnings_collector,arg2=240,freq=60
    metric: name=running.over_480s,collector=func,arg1=runnings_collector,arg2=480,freq=60
    metric: name=running.over_960s,collector=func,arg1=runnings_collector,arg2=960,freq=60
    metric: name=running.over_1920s,collector=func,arg1=runnings_collector,arg2=1920,freq=60
    metric: name=running.over_3840s,collector=func,arg1=runnings_collector,arg2=3840,freq=60

About

Collects overlimited uwsgi request

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages