{"id":1193305,"date":"2016-11-16T09:41:39","date_gmt":"2016-11-16T17:41:39","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-running-queries-crashing-my-sql-database\/"},"modified":"2016-11-16T09:41:39","modified_gmt":"2016-11-16T17:41:39","slug":"long-running-queries-crashing-my-sql-database","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-running-queries-crashing-my-sql-database\/","title":{"rendered":"Long Running Queries Crashing My SQL Database"},"content":{"rendered":"<p>My host has taken my site down because of too much My SQL activity. I think someone (or the updated plug in) is running a bunch of queries against my event calendar. I can&#8217;t access the site to fix it at the moment. But if they give me permission again, what do I look for or do? (Not a Techie). <\/p>\n<p>Here is the log file they sent&#8230; Can you help me troubleshoot what&#8217;s going on??<\/p>\n<p>CPU_TIME:456    table_rows_read:29111888        SELECTS:9343    ROWS_UPDATED:0  ROWS_FETCHED:349729     BUSY_TIME:479   ONNECTED_TIME:619       BYTES_SENT:67330790     BYTES_RECEIVED:1619016  WAIT_TIME:23<\/p>\n<p>Top table row reads:<br \/>\nDB_USER: pseybold_bbmeusa &#8212; TOTAL_CONNECTIONS: 67 &#8212; CONNECTED_TIME: 619 &#8212; CPU_TIME: 456 &#8212; TABLE_ROW_READS: 29111888 &#8212; SELECT_COMMANDS: 9344 &#8212; UPDATE_COMMANDS:  &#8212; BUSY_TIME: 479 &#8212; BYTES_SENT: 67330790 &#8212; BYTES_RECEIVED: 1619121 &#8212; WAIT_TIME (IO): 23<\/p>\n<p>Top WAIT (IO) TIME:<br \/>\nDB_USER: pseybold_bbmeusa &#8212; TOTAL_CONNECTIONS: 67 &#8212; CONNECTED_TIME: 619 &#8212; CPU_TIME: 456 &#8212; TABLE_ROW_READS: 29111888 &#8212; SELECT_COMMANDS: 9344 &#8212; UPDATE_COMMANDS:  &#8212; BUSY_TIME: 479 &#8212; BYTES_SENT: 67330790 &#8212; BYTES_RECEIVED: 1619121 &#8212; WAIT_TIME (IO): 23<\/p>\n<p>pseybold  75727 10.0  0.1 343316 53948 ?        SN   11:03   0:01 \/opt\/php54\/bin\/php-cgi \/home2\/pseybold\/public_html\/index.php<br \/>\npseybold  76317 11.0  0.0 310456 20484 ?        SN   11:03   0:00 \/opt\/php54\/bin\/php-cgi \/home2\/pseybold\/public_html\/index.php<\/p>\n<p>Wed Nov 16 11:03:22 CST 2016<br \/>\nRunning Processes:<br \/>\npseybold   75727 10.0  0.1 343316 53948 ?        SN   11:03   0:01 \/opt\/php54\/bin\/php-cgi \/home2\/pseybold\/public_html\/index.php<br \/>\npseybold   76317 14.0  0.0 316708 26616 ?        RN   11:03   0:00 \/opt\/php54\/bin\/php-cgi \/home2\/pseybold\/public_html\/index.php<\/p>\n<p>Running Queries:<br \/>\n*************************** 1. row ***************************<br \/>\n   USER: pseybold_bbmeusa<br \/>\n     DB: pseybold_boothbay<br \/>\n  STATE: Sending data<br \/>\n   TIME: 0<br \/>\nCOMMAND: Query<br \/>\n   INFO: SELECT option_name, option_value FROM bbr_options WHERE autoload = &#8216;yes&#8217;<br \/>\n*************************** 2. row ***************************<br \/>\n   USER: pseybold_bbmeusa<br \/>\n     DB: pseybold_boothbay<br \/>\n  STATE: Copying to tmp table<br \/>\n   TIME: 0<br \/>\nCOMMAND: Query<br \/>\n   INFO: SELECT SQL_CALC_FOUND_ROWS DISTINCT bbr_posts.*, MIN(bbr_postmeta.meta_value) as EventStartDate, MIN(tribe_event_end_date.meta_value) as EventEndDate FROM bbr_posts  INNER JOIN bbr_postmeta ON ( bbr_posts.ID = bbr_postmeta.post_id ) LEFT JOIN bbr_postmeta as tribe_event_end_date ON ( bbr_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = &#8216;_EventEndDate&#8217; )  WHERE 1=1  AND (<br \/>\n  bbr_postmeta.meta_key = &#8216;_EventStartDate&#8217;<br \/>\n) AND bbr_posts.post_type = &#8216;tribe_events&#8217; AND (bbr_posts.post_status = &#8216;publish&#8217; OR bbr_posts.post_status = &#8216;tribe-ea-success&#8217; OR bbr_posts.post_status = &#8216;tribe-ea-failed&#8217; OR bbr_posts.post_status = &#8216;tribe-ea-schedule&#8217; OR bbr_posts.post_status = &#8216;tribe-ea-pending&#8217; OR bbr_posts.post_status = &#8216;tribe-ea-draft&#8217;) AND (bbr_postmeta.meta_value &gt;= &#8216;2016-11-16 17:03:22&#8217; OR (bbr_postmeta.meta_value &lt;= &#8216;2016-11-16 17:03:22&#8217; AND tribe_event_end_date.meta_value &gt;= &#8216;2016-11-16 17:03:22&#8217; )) GROUP BY bbr_posts.ID ORDER BY EventStartDate ASC, bbr_posts.post_date ASC LIMIT 0, 7<\/p>\n","protected":false},"template":"","class_list":["post-1193305","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Long Running Queries Crashing My SQL Database -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-running-queries-crashing-my-sql-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Long Running Queries Crashing My SQL Database -\" \/>\n<meta property=\"og:description\" content=\"My host has taken my site down because of too much My SQL activity. I think someone (or the updated plug in) is running a bunch of queries against my event calendar. I can&#8217;t access the site to fix it at the moment. But if they give me permission again, what do I look for [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-running-queries-crashing-my-sql-database\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-running-queries-crashing-my-sql-database\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-running-queries-crashing-my-sql-database\/\",\"name\":\"Long Running Queries Crashing My SQL Database -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-11-16T17:41:39+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-running-queries-crashing-my-sql-database\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-running-queries-crashing-my-sql-database\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-running-queries-crashing-my-sql-database\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Long Running Queries Crashing My SQL Database\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Long Running Queries Crashing My SQL Database -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-running-queries-crashing-my-sql-database\/","og_locale":"en_US","og_type":"article","og_title":"Long Running Queries Crashing My SQL Database -","og_description":"My host has taken my site down because of too much My SQL activity. I think someone (or the updated plug in) is running a bunch of queries against my event calendar. I can&#8217;t access the site to fix it at the moment. But if they give me permission again, what do I look for [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-running-queries-crashing-my-sql-database\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-running-queries-crashing-my-sql-database\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-running-queries-crashing-my-sql-database\/","name":"Long Running Queries Crashing My SQL Database -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-11-16T17:41:39+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-running-queries-crashing-my-sql-database\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-running-queries-crashing-my-sql-database\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-running-queries-crashing-my-sql-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Long Running Queries Crashing My SQL Database"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1193305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1193305\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1193305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}