0fa463010909722ad54a2a938e244b0bc9c94589 hiram Tue May 7 13:32:50 2019 -0700 provide error exit timing for apache error_log refs #18869 diff --git src/hg/hubApi/hubApi.c src/hg/hubApi/hubApi.c index 285b52f..288fce3 100644 --- src/hg/hubApi/hubApi.c +++ src/hg/hubApi/hubApi.c @@ -33,31 +33,31 @@ /* this selects output type 'arrays', where the default type is: objects */ boolean jsonOutputArrays = FALSE; /* set by CGI parameter 'jsonOutputArrays' */ boolean measureTiming = FALSE; /* set by CGI parameters */ /* Global only to this one source file */ static struct cart *cart; /* CGI and other variables */ static struct hash *oldVars = NULL; static struct hash *trackCounter = NULL; static long totalTracks = 0; static boolean allTrackSettings = FALSE; /* checkbox setting */ static char **shortLabels = NULL; /* public hub short labels in array */ static int publicHubCount = 0; static char *defaultHub = "Plants"; static char *defaultDb = "ce11"; -static long enteredMainTime = 0; /* will become = clock1000() on entry */ +long enteredMainTime = 0; /* will become = clock1000() on entry */ /* to allow calculation of when to bail out, taking too long */ static long timeOutSeconds = 100; static boolean timedOut = FALSE; static char *urlPrefix = ""; /* initalized to support self references */ /* supportedTypes will be initialized to a known supported set */ static struct slName *supportedTypes = NULL; static void initSupportedTypes() /* initalize the list of supported track types */ { struct slName *el = newSlName("bed"); slAddHead(&supportedTypes, el); el = newSlName("wig"); @@ -1071,30 +1071,31 @@ hPrintf("\n"); hPrintf("\n"); hPrintf("
\n"); hPrintf("\n"); hPrintf("\n", err429, err429Msg); hPrintf("Your host, %s, has been sending too many requests lately and is " "unfairly loading our site, impacting performance for other users. " "Please contact genome@soe.ucsc.edu to ask that your site " "be reenabled. Also, please consider downloading sequence and/or " "annotations in bulk -- see http://genome.ucsc.edu/downloads.html.", hogHost); hPrintf("
\n"); +cgiExitTime("hubApi hogExit", enteredMainTime); exit(0); } static void hogExit() /* bottleneck server requests exit */ { char *hogHost = getenv("REMOTE_ADDR"); char *pathInfo = getenv("PATH_INFO"); /* nothing on incoming path, then display the WEB page instead */ if (sameOk("/",pathInfo)) pathInfo = NULL; if (isNotEmpty(pathInfo)) { sendJsonHogMessage(hogHost); }