diff options
author | Arne Juul <arnej@verizonmedia.com> | 2020-09-09 11:44:44 +0000 |
---|---|---|
committer | Arne Juul <arnej@verizonmedia.com> | 2020-09-09 11:46:23 +0000 |
commit | 813c6084ebb71613310c1f015501e78144254c1c (patch) | |
tree | 49738a81f7bcc2bd60a230a19357805bf5b2428f /vespalog | |
parent | ea33b99bc73a50aabbd42a79cc83159bf61a4e79 (diff) |
more time for clean shutdown
* wait 12 minutes before sending SIGTERM to entire process group
* wait 15 minutes before sending SIGKILL to entire process group
Diffstat (limited to 'vespalog')
-rw-r--r-- | vespalog/src/logger/runserver.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vespalog/src/logger/runserver.cpp b/vespalog/src/logger/runserver.cpp index f1754e84272..39e4f57418a 100644 --- a/vespalog/src/logger/runserver.cpp +++ b/vespalog/src/logger/runserver.cpp @@ -390,16 +390,16 @@ int main(int argc, char *argv[]) } else { fprintf(stdout, "%s was running with pid %d, sending SIGTERM\n", service, pid); - if (killpg(pid, SIGTERM) != 0) { + if (kill(pid, SIGTERM) != 0) { fprintf(stderr, "could not signal %d: %s\n", pid, strerror(errno)); return 1; } } - fprintf(stdout, "Waiting for exit (up to 60 seconds)\n"); - for (int cnt(0); cnt < 1800; cnt++) { + fprintf(stdout, "Waiting for exit (up to 15 minutes)\n"); + for (int cnt(0); cnt < 86400; cnt++) { usleep(100000); // wait 0.1 seconds - if ((cnt > 300) && (cnt % 100 == 0)) { + if ((cnt > 7200) && (cnt % 100 == 0)) { killpg(pid, SIGTERM); } if (killpg(pid, 0) == 0) { @@ -411,7 +411,7 @@ int main(int argc, char *argv[]) fprintf(stdout, "DONE\n"); break; } - if (cnt == 900) { + if (cnt == 9000) { printf("\ngiving up, sending KILL signal\n"); killpg(pid, SIGKILL); } |