8aa6962feea3d82de4b697351040fadd50da2754
hiram
  Thu Aug 15 15:16:44 2019 -0700
begin to call bottleneck server at the very beginning of hgTracks and ready for other CGIs with library function refs #23217

diff --git src/hg/hgTracks/mainMain.c src/hg/hgTracks/mainMain.c
index b49b72f..d8e50b0 100644
--- src/hg/hgTracks/mainMain.c
+++ src/hg/hgTracks/mainMain.c
@@ -13,36 +13,40 @@
 #include "dystring.h"
 #include "hash.h"
 #include "cheapcgi.h"
 #include "htmshell.h"
 #include "web.h"
 #include "cart.h"
 #include "hdb.h"
 #include "hui.h"
 #include "hgFind.h"
 #include "hgTracks.h"
 #include "versionInfo.h"
 #include "net.h"
 #include "search.h"
 #include "imageV2.h"
 #include "extTools.h"
+#include "botDelay.h"
+#include "hgConfig.h"
 
+boolean issueBotWarning;
 
 int main(int argc, char *argv[])
 {
 long enteredMainTime = clock1000();
 measureTime(NULL);
+issueBotWarning = earlyBotCheck(enteredMainTime, "hgTracks", delayFraction, warnMs, exitMs);
 browserName = hBrowserName();
 organization = "UCSC";
 
 /* Push very early error handling - this is just
  * for the benefit of the cgiVarExists, which
  * somehow can't be moved effectively into doMiddle. */
 htmlPushEarlyHandlers();
 cgiSpoof(&argc, argv);
 char * link = webTimeStampedLinkToResourceOnFirstCall("HGStyle.css",TRUE); // resource file link
 if (link)                                                                  // wrapped in html
     htmlSetStyle(link);
 
 oldVars = hashNew(10);
 
 if (cgiVarExists("hgt.redirectTool"))