{"id":2730,"date":"2019-10-23T10:52:18","date_gmt":"2019-10-23T02:52:18","guid":{"rendered":"https:\/\/www.mondoze.com\/guide\/?post_type=kb&#038;p=2730"},"modified":"2022-10-05T08:02:04","modified_gmt":"2022-10-05T00:02:04","slug":"why-are-railgun-requests-showing-as-stream","status":"publish","type":"kb","link":"https:\/\/www.mondoze.com\/guide\/kb\/why-are-railgun-requests-showing-as-stream","title":{"rendered":"Why are Railgun requests showing as Stream?"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"2730\" class=\"elementor elementor-2730\" data-elementor-settings=\"[]\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-478494ee elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"478494ee\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3fb64553\" data-id=\"3fb64553\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ed15334 elementor-widget elementor-widget-heading\" data-id=\"ed15334\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Why Are Railgun Requests Showing as Stream?<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4793d752 elementor-widget elementor-widget-text-editor\" data-id=\"4793d752\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<p>The presence of\u00a0<code>stream<\/code>\u00a0in place of a compression ratio indicates that the response from the origin was greater than the value set in the\u00a0<code>stream.size<\/code>\u00a0parameter within the\u00a0<code>railgun.conf<\/code> file (default value is 250000 bytes).\u00a0<\/p><p>This status results in the request not being compress and serve in a streaming fashion.<\/p><p>*Please refer to our\u00a0Reading and Interpreting the &#8216;Cf-Railgun&#8217; Header\u00a0article for additional technical information on the\u00a0<code>Cf-Railgun<\/code>\u00a0header.<\/p><h3><strong>Troubleshooting<\/strong><\/h3><p>If a continual\/repeated\u00a0<code>stream<\/code>\u00a0status is occurring for requests, please check for the following conditions that are common causes:<\/p><p><span class=\"word\">-MirageLMemcached <\/span><span class=\"word\">does\u00a0<\/span><span class=\"word\">not\u00a0<\/span><span class=\"word\">work,\u00a0<\/span><span class=\"word\">or\u00a0<\/span><span class=\"word\">the\u00a0<\/span><span class=\"word\">listener\u00a0<\/span><span class=\"word\">has\u00a0<\/span><span class=\"word\">trouble\u00a0<\/span><span class=\"word\">connecting\u00a0<\/span><span class=\"word\">to\u00a0<\/span><span class=\"word\">it. <\/span><span class=\"word\">Please\u00a0<\/span><span class=\"word\">execute\u00a0<\/span><span class=\"word\">the\u00a0<\/span><span class=\"word\">following\u00a0<\/span><span class=\"word\">order\u00a0<\/span><span class=\"word\">to\u00a0<\/span><span class=\"word\">validate\u00a0<\/span><span class=\"word\">the\u00a0<\/span><span class=\"word\">running\u00a0<\/span><span class=\"word\">of\u00a0<\/span><span class=\"word\">memcached:<\/span><\/p><pre>ps aux | grep memcached<\/pre><p>If you are connecting Railgun to memcached using a loopback inet connection to localhost, confirm there are not any firewall rules that would prevent connections. If using a unix socket, make sure the permissions and ownerships on the sock file are set correctly.<\/p><p>&#8211; Memcache wasn&#8217;t given enough memory.<\/p><p>By default, memcache is configure to only use 64MB of memory. We generally recommend Railgun be configure to have between 512MB and 2GB of memory allocate.<\/p><p>&#8211; The file the visitor is trying to access is larger than 250KB.<\/p><p>By default, rg-listener will stream files larger than 250KB, rather than try to compress them. This is because we decide that it would be faster\/less computationally expensive for them to be stream. This can be increase using the stream. Size setting in the Railgun configuration settings. `Please note this can&#8217;t be increase beyond 1MB`.<\/p><p>&#8211; When the response body is zero bytes, or the request is simply too small to compress.<\/p><p>If the request is serve with a response body of zero bytes (common for 301\/302 redirects for example), then the request will be serve without compression. The same case would apply if the response was only several KB in size, as that would be more computationally expensive to compress, then simply serving the data uncompress to the client.<\/p><p>&#8211; The MIME type of the response was not of a type that Railgun supports.If the response doesn&#8217;t match one of these content types, it will not be compressed:<\/p><ul><li>Anything beginning with\u00a0<code>\"text\/\"<\/code><\/li><li>Any\u00a0<code>\"application\/\"<\/code>\u00a0type that ends with the string\u00a0<code>\"+xml\"<\/code><\/li><li><code>\"application\/json\"<\/code><\/li><li><code>\"application\/ecmascript\"<\/code><\/li><li><code>\"application\/javascript\"<\/code><\/li><li><code>\"application\/x-javascript\"<\/code><\/li><li><code>\"application\/xml\"<\/code><\/li><li><code>\"application\/dart\"<\/code><\/li><\/ul><p>*Please note that the MIME type is determined by the\u00a0<code>Content-Type<\/code>\u00a0header sent by the origin.<\/p>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Why Are Railgun Requests Showing as Stream? The presence of\u00a0stream\u00a0in place of a compression ratio indicates that the response from the origin was greater than the value set in the\u00a0stream.size\u00a0parameter within the\u00a0railgun.conf file (default value is 250000 bytes).\u00a0 This status results in the request not being compress and serve in a streaming fashion. *Please refer &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.mondoze.com\/guide\/kb\/why-are-railgun-requests-showing-as-stream\"> <span class=\"screen-reader-text\">Why are Railgun requests showing as Stream?<\/span> Read More \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}}},"kbtopic":[53],"kbtag":[110],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/2730"}],"collection":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/comments?post=2730"}],"version-history":[{"count":6,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/2730\/revisions"}],"predecessor-version":[{"id":18788,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/2730\/revisions\/18788"}],"wp:attachment":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/media?parent=2730"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=2730"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kbtag?post=2730"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=2730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}