Closed hekod777 closed 5 years ago
This is somewhat intentional. The timeout configured in the middleware is the timeout waiting for Rendertron to respond. In the case where we receive no response at all, your server should still respond to the incoming request.
It was not intended to use this flag as a configuration for Rendertron itself, which has a 10 second timeout. Since this consumes resources, it is probably best that Rendertron doesn't allow the timeout to be configured by any incoming request (eg. from the middleware), but rather its specified in the setup configuration. Would an option to configure it there be sufficient? ie. it would be an additional config option here: https://github.com/GoogleChrome/rendertron#config
A new option in config.json works.
And is there any side effect if I increase the timeout to like 13 secs or maybe 15 secs?
also the docs of rendertron middleware should use an update.
Millisecond timeout for the proxy request to Rendertron. If exceeded, the standard response is served (i.e. next() is called). See also the Rendertron timeout.
The current description of timeout
option in rendertron middleware is quite misleading.
According to docs, the default timeout for rendertron is 11000
When I tried to make render requests using the codes below
The timeout was not changed. If a pages takes 10 secs, rendertron will send back whatever it has rendered and gives the following warning
For AngularJS apps, it's nothing life and death. Most of the time even if there is a warning, what is sent back is good enough for bots to perform indexing. But if it's a web component page, with this warning it will send back a blank page. A customizable timeout can ensure the quality of render results.
A fix is needed.