The presence of stream in place of a compression ratio indicates that the response from the origin was greater than the value set in the stream.size parameter within the railgun.conf file (default value is 250000 bytes).


This status results in the request not being compressed and served in a streaming fashion.


*Please refer to our Reading and Interpreting the 'Cf-Railgun' Header article for additional technical information on the Cf-Railgun header.



Troubleshooting

If a continual/repeated stream status is occurring for requests, please check for the following conditions that are common causes:

- Memcached isn't running, or the Listener is having trouble connecting to it.Please run the following command to confirm memcached is running:

ps aux | grep memcached

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.


- Memcached wasn't given enough memory.

By default, memcached is configured to only use 64MB of memory. We generally recommend Railgun be configured to have between 512MB and 2GB of memory allocated.


- The file the visitor is trying to access is larger than 250KB.

By default, rg-listener will stream files larger than 250KB, rather than try to compress them. This is because we decided that it would be faster/less computationally expensive for them to be streamed. This can be increased using the stream.size setting in the Railgun configuration settings. `Please note this can't be increased beyond 1MB`.


- When the response body is zero bytes, or the request is simply too small to compress.

If the request is served with a response body of zero bytes (common for 301/302 redirects for example), then the request will be served 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 uncompressed to the client.


- The MIME type of the response was not of a type that Railgun supports.If the response doesn't match one of these content types, it will not be compressed:

  • Anything beginning with "text/"
  • Any "application/" type that ends with the string "+xml"
  • "application/json"
  • "application/ecmascript"
  • "application/javascript"
  • "application/x-javascript"
  • "application/xml"
  • "application/dart"


*Please note that the MIME type is determined by the Content-Type header sent by the origin.