{"id":1605,"date":"2020-06-07T22:18:14","date_gmt":"2020-06-07T14:18:14","guid":{"rendered":"https:\/\/www.wesbytes.com\/guide\/?post_type=kb&#038;p=1605"},"modified":"2026-01-12T13:56:16","modified_gmt":"2026-01-12T05:56:16","slug":"why-are-railgun-requests-showing-as-stream","status":"publish","type":"kb","link":"https:\/\/www.servergigabit.com\/guide\/kb\/why-are-railgun-requests-showing-as-stream","title":{"rendered":"Why are Railgun requests showing as Stream?"},"content":{"rendered":"<h3><img decoding=\"async\" src=\"https:\/\/cf-assets.www.cloudflare.com\/zkvhlag99gkb\/6IfT9icfzUPftggaTxi5pK\/e1fa9f23696af5dff87058eda5003466\/how-to-tell-how-well-railgun-is-working-for-y.png\" alt=\"How to Tell How Well Railgun Is Working for Your Site\" \/><\/h3>\n<h3><strong>Why are Railgun requests showing as Stream?<\/strong><\/h3>\n<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>\u00a0file (default value is 250000 bytes).<\/p>\n<p>This status results in the request not being compress and serve in a streaming fashion.<\/p>\n<p>*Please refer to our\u00a0Reading and Interpreting the \u2018<a href=\"https:\/\/www.servergigabit.com\/guide\/kb\/how-can-i-do-if-railgun-is-running-on-my-site\">Cf-Railgun<\/a>\u2019 Header\u00a0<a href=\"https:\/\/www.servergigabit.com\/guide\/kb\/how-can-i-do-if-railgun-is-running-on-my-site\">article<\/a> for additional technical information on the\u00a0<a href=\"https:\/\/www.servergigabit.com\/guide\/kb\/how-can-i-do-if-railgun-is-running-on-my-site\"><code>Cf-Railgun<\/code><\/a>\u00a0header.<\/p>\n<div class=\"mkb-anchor mkb-clearfix mkb-back-to-top-inline\">\n<h6 class=\"mkb-anchor__title\">Troubleshooting<\/h6>\n<\/div>\n<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>\n<p><span class=\"word\">-Mirage Memcached <\/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.\u00a0<\/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>\n<pre>ps aux | grep memcached<\/pre>\n<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>\n<div class=\"mkb-anchor mkb-clearfix mkb-back-to-top-inline\">\n<h6 class=\"mkb-anchor__title\">\u2013 Memcache wasn\u2019t given enough memory.<\/h6>\n<\/div>\n<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>\n<div class=\"mkb-anchor mkb-clearfix mkb-back-to-top-inline\">\n<h6 class=\"mkb-anchor__title\">\u2013 The file the visitor is trying to access is larger than 250KB.<\/h6>\n<\/div>\n<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\u2019t be increase beyond 1MB`.<\/p>\n<p>\u2013 When the response body is zero bytes, or the request is simply too small to compress.<\/p>\n<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>\n<p>\u2013 The MIME type of the response was not of a type that Railgun supports.If the response doesn\u2019t match one of these content types, it will not be compressed:<\/p>\n<ul>\n<li>Anything beginning with\u00a0<code>\"text\/\"<\/code><\/li>\n<li>Any\u00a0<code>\"application\/\"<\/code>\u00a0type that ends with the string\u00a0<code>\"+xml\"<\/code><\/li>\n<li><code>\"application\/json\"<\/code><\/li>\n<li><code>\"application\/ecmascript\"<\/code><\/li>\n<li><code>\"application\/javascript\"<\/code><\/li>\n<li><code>\"application\/x-javascript\"<\/code><\/li>\n<li><code>\"application\/xml\"<\/code><\/li>\n<li><code>\"application\/dart\"<\/code><\/li>\n<\/ul>\n<p>*Please note that the MIME type is determined by the\u00a0<code>Content-Type<\/code>\u00a0header sent by the origin.<\/p>\n","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\u00a0file (default value is 250000 bytes). This status results in the request not being compress and serve in a streaming fashion. *Please refer to our\u00a0Reading and Interpreting the \u2018Cf-Railgun\u2019&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"kbtopic":[43],"kbtag":[1419,1420],"class_list":["post-1605","kb","type-kb","status-publish","hentry","kbtopic-cloudflare","kbtag-railgun","kbtag-stream"],"_links":{"self":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/comments?post=1605"}],"version-history":[{"count":4,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1605\/revisions"}],"predecessor-version":[{"id":6022,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1605\/revisions\/6022"}],"wp:attachment":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/media?parent=1605"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=1605"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kbtag?post=1605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}