{"id":877508,"date":"2014-11-11T14:33:57","date_gmt":"2014-11-11T22:33:57","guid":{"rendered":"http:\/\/tri.be\/support\/forums\/topic\/long-query-error-502-bad-gateway-eror\/"},"modified":"2014-12-01T16:16:25","modified_gmt":"2014-12-02T00:16:25","slug":"long-query-error-502-bad-gateway-eror","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-query-error-502-bad-gateway-eror\/","title":{"rendered":"Long Query Error &amp; 502 Bad Gateway Eror"},"content":{"rendered":"<p>We see lots of long query errors in our logs. We also see lots of 502 Bad Gateway errors. I am not certain the two are related, but this is my suspicion. I think it may be the case that the long queries are bogging the server down, which makes it unable to serve pages\u2014thus the 502s. Interestingly, the 502s are not generally seen on the events page but on random pages on a subsite of our multisite network.<\/p>\n<p>We don&#8217;t have very many events. Maybe a few dozen, none recurring. Our site is hosted on WP Engine at the &#8220;Professional&#8221; tier. This should be more than enough to handle our traffic. <\/p>\n<p>I see that there are several threads related to issues with the Events Calendar on WP Engine hosted sites, however I haven&#8217;t been able to find any that give solutions. The closest I&#8217;ve seen is this thread from this July [https:\/\/tri.be\/support\/forums\/topic\/abandoning-events-calendar-pro\/], in which Caleb wrote that the issue could be resolved by removing the limit on WPEngine&#8217;s side:<br \/>\n========<br \/>\nThis is a known issue with WP Engine, since they limit the length of SQL queries. Try adding the following to your wp-config.php file, which should hopefully disable that limit in WP Engine:<br \/>\ndefine( &#8216;WPE_GOVERNOR&#8217;, false );<br \/>\n========<br \/>\nI asked WPEngine if I should do this, and they said that this would prevent the error from being logged but would not prevent the error itself. So I don&#8217;t think that will solve my issue.<\/p>\n<p>So far I&#8217;ve updated both Tribe calendar plugins, updated WordPress, deactivated and deleted Events Calendar Pro, and removed the plugin from a sub-site (blazingmountain.org). Still seeing the long query errors.<\/p>\n<p>So my main question is how do I get the plugin to stop generating these long query errors. My secondary question: Do you think the long query could be related to the 502 errors.<\/p>\n<p>I love the plugin! Please help me figure out how to make it work for my site. Thanks!<\/p>\n","protected":false},"template":"","class_list":["post-877508","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 Query Error &amp; 502 Bad Gateway Eror -<\/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-query-error-502-bad-gateway-eror\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Long Query Error &amp; 502 Bad Gateway Eror -\" \/>\n<meta property=\"og:description\" content=\"We see lots of long query errors in our logs. We also see lots of 502 Bad Gateway errors. I am not certain the two are related, but this is my suspicion. I think it may be the case that the long queries are bogging the server down, which makes it unable to serve pages\u2014thus [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-query-error-502-bad-gateway-eror\/\" \/>\n<meta property=\"article:modified_time\" content=\"2014-12-02T00:16:25+00:00\" \/>\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-query-error-502-bad-gateway-eror\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-query-error-502-bad-gateway-eror\/\",\"name\":\"Long Query Error &amp; 502 Bad Gateway Eror -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2014-11-11T22:33:57+00:00\",\"dateModified\":\"2014-12-02T00:16:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-query-error-502-bad-gateway-eror\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-query-error-502-bad-gateway-eror\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-query-error-502-bad-gateway-eror\/#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 Query Error &amp; 502 Bad Gateway Eror\"}]},{\"@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 Query Error &amp; 502 Bad Gateway Eror -","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-query-error-502-bad-gateway-eror\/","og_locale":"en_US","og_type":"article","og_title":"Long Query Error &amp; 502 Bad Gateway Eror -","og_description":"We see lots of long query errors in our logs. We also see lots of 502 Bad Gateway errors. I am not certain the two are related, but this is my suspicion. I think it may be the case that the long queries are bogging the server down, which makes it unable to serve pages\u2014thus [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-query-error-502-bad-gateway-eror\/","article_modified_time":"2014-12-02T00:16:25+00:00","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-query-error-502-bad-gateway-eror\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-query-error-502-bad-gateway-eror\/","name":"Long Query Error &amp; 502 Bad Gateway Eror -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2014-11-11T22:33:57+00:00","dateModified":"2014-12-02T00:16:25+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-query-error-502-bad-gateway-eror\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-query-error-502-bad-gateway-eror\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/long-query-error-502-bad-gateway-eror\/#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 Query Error &amp; 502 Bad Gateway Eror"}]},{"@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\/877508","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\/877508\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=877508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}