{"id":31881,"date":"2017-10-06T14:42:01","date_gmt":"2017-10-06T06:42:01","guid":{"rendered":"http:\/\/localhost\/help\/?page_id=31881"},"modified":"2020-11-11T17:21:23","modified_gmt":"2020-11-11T09:21:23","slug":"fetch-request-was-declined","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-troubleshooting\/fetch-request-was-declined\/","title":{"rendered":"Fetch Request Was Declined"},"content":{"rendered":"<p class=\"intro-text\"><strong>Problem<\/strong>: A fetch request error appears in P2 Explorer.<\/p>\n<p class=\"intro-text\"><strong>Description<\/strong>:\u00a0Sampled fetches are declined with an error in P2 Explorer, similar to the following:<\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/10\/image003.png\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-31580\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/10\/image003.png\" alt=\"\" width=\"808\" height=\"128\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/10\/image003.png 808w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/10\/image003-768x122.png 768w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/10\/image003-150x24.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/10\/image003-24x4.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/10\/image003-36x6.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/10\/image003-48x8.png 48w\" sizes=\"auto, (max-width: 808px) 100vw, 808px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\">For raw fetches, the error is slightly different:<\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/10\/image005.png\" rel=\"lightbox-1\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-31581\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/10\/image005.png\" alt=\"\" width=\"809\" height=\"127\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/10\/image005.png 809w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/10\/image005-768x121.png 768w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/10\/image005-150x24.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/10\/image005-24x4.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/10\/image005-36x6.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/10\/image005-48x8.png 48w\" sizes=\"auto, (max-width: 809px) 100vw, 809px\" \/><\/a><\/p>\n<p class=\"intro-text\">\u00a0<\/p>\n<p class=\"intro-text\"><strong>Cause<\/strong>: The fetch exceeds the fetch limit for a tag. The\u00a0tag fetch limit ensures that the system remains responsive for all users and that a single user cannot accidentally overload the system, and\u00a0restricts the amount of data that can be fetched for a tag in a particular fetch. The limit only applies in the context of a single tag on the request e.g. if a request contains 5 tags, the limit is run for each tag independently of the others.<\/p>\n<p class=\"intro-text\"><strong>Resolution<\/strong>: If a user encounters a \u2018fetch request was declined\u2019 error, these are the steps which should be taken:<\/p>\n<ul class=\"intro-text\">\n<li>For <strong>Average, Linear Interpolate and Last Known Value<\/strong> fetches, you should increase the sample interval or decrease the time range, until you are fetching less than the maximum number of data points. In most cases, there are not enough pixels on the screen to render any sets of data with more points than this.<br \/>\n \u00a0<\/li>\n<li>For <strong>Raw<\/strong> fetches, you should configure the <em>Scan Rate<\/em> property of the tag in the Historian, or the <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/connecting-your-data\/creating-a-tag-datasource\/\">Default Tag Scan Rate<\/a>\u00a0property in the Datasource in P2 Server Management. If the user is still getting this error, then they should consider falling back to one of the sample methods above (Average, Linear Interpolate, or Last Known Value) in order to down-sample the data.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\"><strong>How the Number of Data Points is Calculated<\/strong><\/p>\n<p class=\"intro-text\">For\u00a0<strong>sampled fetches<\/strong>\u00a0(Average, Linear Interpolate, Last Known Value), the actual number of data points a fetch will return is calculated in advance. The calculation is:<\/p>\n<ul class=\"intro-text\">\n<li class=\"code-fragment\">Points requested = EndTime \u2013 StartTime \/ Sample Interval<\/li>\n<\/ul>\n<p class=\"intro-text\">For\u00a0<strong>raw fetches<\/strong>, the number of data points a fetch will return is estimated using the tag\u2019s Scan Rate. If the tag\u2019s Scan Rate is not configured, the <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/connecting-your-data\/creating-a-tag-datasource\/\">Default Tag Scan Rate<\/a> from the datasource will be used. If neither of those has been configured, the system will assume a Scan Rate of 10 seconds. The calculation is:<\/p>\n<ul class=\"intro-text\">\n<li class=\"code-fragment\">Points requested = EndTime \u2013 StartTime \/ Scan Rate<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\"><strong>Setting the Maximum Number of Data Points<\/strong><\/p>\n<p class=\"intro-text\">The configuration parameter <em>MaxDataPointsFetchedPerTag<\/em>\u00a0(located in C:\\Program Files\\P2 Energy Solutions\\P2 Server\\Configuration\\ServerConfig.xml) enables system administrators to set the maximum number of data points that can be retrieved per tag in a single adaptor request.\u00a0By default, this value is set to 15,000 data points.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article describes the steps that should be taken if a user encounters a \u2018fetch request was declined\u2019 error in P2 Explorer.<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-troubleshooting\/fetch-request-was-declined\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":16408,"parent":575,"menu_order":17,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[10],"tags":[417,468,223],"class_list":["post-31881","page","type-page","status-publish","has-post-thumbnail","hentry","category-troubleshooting","tag-error","tag-performance","tag-tag-fetch","Version-4-5-3","Product-ex"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/31881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/comments?post=31881"}],"version-history":[{"count":1,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/31881\/revisions"}],"predecessor-version":[{"id":46129,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/31881\/revisions\/46129"}],"up":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/575"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media\/16408"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=31881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=31881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=31881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}