X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=main.go;h=facfa6569e58a660e078614f8763900945b2328f;hb=94ddec26f9f9ff4607c9ad6f9ca1e6b82ae0af71;hp=c7de87b4fb3b5532b50bec5298627cdee361c97f;hpb=02fa63ed2a28d2062f2e3e9bf80f8662af841e9b;p=pstop.git diff --git a/main.go b/main.go index c7de87b..facfa65 100644 --- a/main.go +++ b/main.go @@ -59,6 +59,9 @@ func connect_by_defaults_file( defaults_file string ) *sql.DB { log.Fatal(err) } + // deliberately limit the pool size to 5 to avoid "problems" if any queries hang. + dbh.SetMaxOpenConns(5) // hard-coded value! + return dbh } @@ -116,6 +119,7 @@ func usage() { // be found. func validate_mysql_version(dbh *sql.DB) error { var tables = [...]string{ + "performance_schema.events_waits_summary_global_by_event_name", "performance_schema.file_summary_by_instance", "performance_schema.table_io_waits_summary_by_table", "performance_schema.table_lock_waits_summary_by_table",