Check-in [d6fdfd372b]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Do not issue error-log panics for timeouts unless the total CPU time exceeds 10 seconds.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d6fdfd372b8da9b841554b3f7d32fe3973d1bb74f2af48172379586f1151b650
User & Date: drh 2024-03-29 19:23:21.958
Context
2024-03-30
09:19
Add MANIFEST_VERSION to the panic log for the case where HAVE_BACKTRACE is false. check-in: f3cac52593 user: stephan tags: trunk
2024-03-29
19:23
Do not issue error-log panics for timeouts unless the total CPU time exceeds 10 seconds. check-in: d6fdfd372b user: drh tags: trunk
17:41
Fix an issue with the "Autopush:" report in "fossil git export". check-in: 0298a6fc86 user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
*/
#ifndef _WIN32
static int nAlarmSeconds = 0;
static void sigalrm_handler(int x){
  sqlite3_uint64 tmUser = 0, tmKernel = 0;
  fossil_cpu_times(&tmUser, &tmKernel);
  if( fossil_strcmp(g.zPhase, "web-page reply")==0
   && tmUser+tmKernel<1000000
  ){
    /* Do not log time-outs during web-page reply unless more than
    ** 1 second of CPU time has been consumed */
    return;
  }
  fossil_panic("Timeout after %d seconds during %s"
               " - user %,llu µs, sys %,llu µs",
               nAlarmSeconds, g.zPhase, tmUser, tmKernel);
}
#endif







|


|







3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
*/
#ifndef _WIN32
static int nAlarmSeconds = 0;
static void sigalrm_handler(int x){
  sqlite3_uint64 tmUser = 0, tmKernel = 0;
  fossil_cpu_times(&tmUser, &tmKernel);
  if( fossil_strcmp(g.zPhase, "web-page reply")==0
   && tmUser+tmKernel<10000000
  ){
    /* Do not log time-outs during web-page reply unless more than
    ** 10 seconds of CPU time has been consumed */
    return;
  }
  fossil_panic("Timeout after %d seconds during %s"
               " - user %,llu µs, sys %,llu µs",
               nAlarmSeconds, g.zPhase, tmUser, tmKernel);
}
#endif