Management Flags
You can remotely (and without taking offline the uWSGI server) modify the behaviour of the uWSGI stack.
Using the uwsgi protocol you can enable/disable/setup the internal options.
All the flags take an unsigned 32bit value (so the block size is always 4) that contain the value to set for the flag. If you do not specify this value (so you send only the uwsgi header) the server will count it as 0.
This is a table of flag available:
| flag | action | note |
| 0 | logging | enable/disable logging |
| 1 | max_requests | set maximum number of requests per worker |
| 2 | socket_timeout | modify the internal socket timeout |
| 3 | memory_debug | enable/disable memory debug/report |
| 4 | master_interval | set the master process check interval |
| 5 | harakiri | set/unset the harakiri timeout |
| 6 | cgi_mode | enable/disable cgi mode |
| 7 | threads | enable/disable python threads |
| 8 | reaper | enable/disable process reaper |
A simple (and ugly) script is included to remotly change management flags:
./uwsgi --no-server -w myadmin --pyargv "192.168.173.16 3031 0 0"
the command will disable logging on the uWSGI server listening on 192.168.173.16 port 3031
and
./uwsgi --no-server -w myadmin --pyargv "192.168.173.16 3031 0 1"
will re-enable it
