00f15751d1fec4a0d7954121eafdd668a80eba2b hiram Thu Jun 2 15:36:43 2011 -0700 error message to apache error logs and polite message for user for cgiApoptosis diff --git src/hg/lib/web.c src/hg/lib/web.c index 84642ad..ceae4b0 100644 --- src/hg/lib/web.c +++ src/hg/lib/web.c @@ -1112,31 +1112,36 @@ /* If genomes don't match, then get the default db for that genome */ if (differentWord(genome, hGenome(retDb))) { retDb = hDefaultDbForGenome(genome); } return retDb; } unsigned long expireSeconds = 0; /* phoneHome business */ static void cgiApoptosis(int status) /* signal handler for SIGALRM for phoneHome function and CGI expiration */ { if (expireSeconds > 0) - errAbort("cgiApoptosis: %lu seconds\n", expireSeconds); + { + /* want to see this error message in the apache error_log also */ + fprintf(stderr, "cgiApoptosis: %lu seconds\n", expireSeconds); + /* most of our CGIs post a polite non-fatal message with this errAbort */ + errAbort("procedures have exceeded timeout: %lu seconds, function has ended.\n", expireSeconds); + } exit(0); } static void phoneHome() { static boolean beenHere = FALSE; if (beenHere) /* one at a time please */ return; beenHere = TRUE; char *expireTime = cfgOptionDefault("browser.cgiExpireMinutes", "20"); unsigned expireMinutes = sqlUnsigned(expireTime); expireSeconds = expireMinutes * 60; char trashFile[PATH_LEN];