mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-05 21:21:53 +00:00
report write_errors in core statistics
This commit is contained in:
@@ -1146,6 +1146,9 @@ struct uwsgi_stats *uwsgi_master_generate_stats() {
|
||||
if (uwsgi_stats_keylong_comma(us, "offloaded_requests", (unsigned long long) uc->offloaded_requests))
|
||||
goto end;
|
||||
|
||||
if (uwsgi_stats_keylong_comma(us, "write_errors", (unsigned long long) uc->write_errors))
|
||||
goto end;
|
||||
|
||||
if (uwsgi_stats_keylong_comma(us, "in_request", (unsigned long long) uc->in_request))
|
||||
goto end;
|
||||
|
||||
|
||||
@@ -625,6 +625,7 @@ void uwsgi_close_request(struct wsgi_request *wsgi_req) {
|
||||
uwsgi.workers[0].requests++;
|
||||
uwsgi.workers[uwsgi.mywid].requests++;
|
||||
uwsgi.workers[uwsgi.mywid].cores[wsgi_req->async_id].requests++;
|
||||
uwsgi.workers[uwsgi.mywid].cores[wsgi_req->async_id].write_errors += wsgi_req->write_errors;
|
||||
// this is used for MAX_REQUESTS
|
||||
uwsgi.workers[uwsgi.mywid].delta_requests++;
|
||||
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ static struct uwsgi_option uwsgi_base_options[] = {
|
||||
|
||||
{"ignore-sigpipe", no_argument, 0, "do not report (annoying) SIGPIPE", uwsgi_opt_true, &uwsgi.ignore_sigpipe, 0},
|
||||
{"ignore-write-errors", no_argument, 0, "do not report (annoying) write()/writev() errors", uwsgi_opt_true, &uwsgi.ignore_write_errors, 0},
|
||||
{"write-errors-tolerance", required_argument, 0, "set the maximum number of allowed write errors (default: no tolerance)", uwsgi_opt_set_int, &uwsgi.write_errors_tolerance, 0},
|
||||
{"write-errors-tolerance", required_argument, 0, "set the maximum number of allowed write errors (default: no tolerance)", uwsgi_opt_set_64bit, &uwsgi.write_errors_tolerance, 0},
|
||||
{"write-errors-exception-only", no_argument, 0, "only raise an exception on write errors giving control to the app itself", uwsgi_opt_true, &uwsgi.write_errors_exception_only, 0},
|
||||
{"disable-write-exception", no_argument, 0, "disable exception generation on write()/writev()", uwsgi_opt_true, &uwsgi.disable_write_exception, 0},
|
||||
|
||||
|
||||
@@ -1265,7 +1265,7 @@ struct uwsgi_cache {
|
||||
int async_plagued;
|
||||
|
||||
int suspended;
|
||||
int write_errors;
|
||||
uint64_t write_errors;
|
||||
|
||||
int *ovector;
|
||||
size_t post_cl;
|
||||
@@ -1647,7 +1647,7 @@ struct uwsgi_server {
|
||||
|
||||
int ignore_sigpipe;
|
||||
int ignore_write_errors;
|
||||
int write_errors_tolerance;
|
||||
uint64_t write_errors_tolerance;
|
||||
int write_errors_exception_only;
|
||||
int disable_write_exception;
|
||||
|
||||
@@ -2303,6 +2303,8 @@ struct uwsgi_rpc {
|
||||
uint64_t routed_requests;
|
||||
uint64_t offloaded_requests;
|
||||
|
||||
uint64_t write_errors;
|
||||
|
||||
pthread_t thread_id;
|
||||
|
||||
int offload_rr;
|
||||
|
||||
Reference in New Issue
Block a user