Skip to content

Commit

Permalink
remove logs with coredump
Browse files Browse the repository at this point in the history
  • Loading branch information
astrophysik committed Dec 12, 2023
1 parent 059823b commit 18f58f7
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions server/php-engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <random>
#include <limits>
#include <netdb.h>
#include <netinet/in.h>
Expand Down Expand Up @@ -827,21 +826,7 @@ int rpcx_func_wakeup(connection *c) {
php_worker.reset();
rpcx_at_query_end(c);
} else {
if (c->pending_queries < 0 || c->status != conn_wait_net) {
std::array<char, 1024> message{'\0'};
std::random_device rd;
int id = rd();
snprintf(message.data(), message.size(), "PhpWorker state %d, PhpScript state %d. Connection pending queries %d, status %d. "
"Net timeout %f, finish_time %f, now %f. PhpScript wait net %d. Coredump generated %s\n",
worker->state, php_script.has_value() ? (int)php_script->state : -1, c->pending_queries, c->status, timeout.value(),
worker->finish_time, precise_now, worker->waiting, id % 1000 == 0? "true" : "false");
// write only in 0.1% actions
if (id % 1000 == 0) {
dl_assert_with_coredump(c->pending_queries >= 0 && c->status == conn_wait_net, message.data());
} else {
dl_assert(c->pending_queries >= 0 && c->status == conn_wait_net, message.data());
}
}
assert (c->pending_queries >= 0 && c->status == conn_wait_net);
assert (*timeout > 0);
set_connection_timeout(c, *timeout);
}
Expand Down

0 comments on commit 18f58f7

Please sign in to comment.