Fossil SCM

Do not issue error-log panics for timeouts unless the total CPU time exceeds 10 seconds.

drh 2024-03-29 19:23 trunk
Commit d6fdfd372b8da9b841554b3f7d32fe3973d1bb74f2af48172379586f1151b650
1 file changed +2 -2
+2 -2
--- src/main.c
+++ src/main.c
@@ -3019,14 +3019,14 @@
30193019
static int nAlarmSeconds = 0;
30203020
static void sigalrm_handler(int x){
30213021
sqlite3_uint64 tmUser = 0, tmKernel = 0;
30223022
fossil_cpu_times(&tmUser, &tmKernel);
30233023
if( fossil_strcmp(g.zPhase, "web-page reply")==0
3024
- && tmUser+tmKernel<1000000
3024
+ && tmUser+tmKernel<10000000
30253025
){
30263026
/* Do not log time-outs during web-page reply unless more than
3027
- ** 1 second of CPU time has been consumed */
3027
+ ** 10 seconds of CPU time has been consumed */
30283028
return;
30293029
}
30303030
fossil_panic("Timeout after %d seconds during %s"
30313031
" - user %,llu µs, sys %,llu µs",
30323032
nAlarmSeconds, g.zPhase, tmUser, tmKernel);
30333033
--- src/main.c
+++ src/main.c
@@ -3019,14 +3019,14 @@
3019 static int nAlarmSeconds = 0;
3020 static void sigalrm_handler(int x){
3021 sqlite3_uint64 tmUser = 0, tmKernel = 0;
3022 fossil_cpu_times(&tmUser, &tmKernel);
3023 if( fossil_strcmp(g.zPhase, "web-page reply")==0
3024 && tmUser+tmKernel<1000000
3025 ){
3026 /* Do not log time-outs during web-page reply unless more than
3027 ** 1 second of CPU time has been consumed */
3028 return;
3029 }
3030 fossil_panic("Timeout after %d seconds during %s"
3031 " - user %,llu µs, sys %,llu µs",
3032 nAlarmSeconds, g.zPhase, tmUser, tmKernel);
3033
--- src/main.c
+++ src/main.c
@@ -3019,14 +3019,14 @@
3019 static int nAlarmSeconds = 0;
3020 static void sigalrm_handler(int x){
3021 sqlite3_uint64 tmUser = 0, tmKernel = 0;
3022 fossil_cpu_times(&tmUser, &tmKernel);
3023 if( fossil_strcmp(g.zPhase, "web-page reply")==0
3024 && tmUser+tmKernel<10000000
3025 ){
3026 /* Do not log time-outs during web-page reply unless more than
3027 ** 10 seconds of CPU time has been consumed */
3028 return;
3029 }
3030 fossil_panic("Timeout after %d seconds during %s"
3031 " - user %,llu µs, sys %,llu µs",
3032 nAlarmSeconds, g.zPhase, tmUser, tmKernel);
3033

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button