Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuring of RSS feed read timeout #765

Open
bkil opened this issue May 23, 2023 · 2 comments
Open

Allow configuring of RSS feed read timeout #765

bkil opened this issue May 23, 2023 · 2 comments
Labels
Feeds Involves the RSS feed service. T-Task Refactoring, enabling or disabling functionality, other engineering tasks.

Comments

@bkil
Copy link

bkil commented May 23, 2023

If an RSS feed is generated dynamically on demand by a dynamic backend, it can take more time than if it is just served from a static file.

In my specific case, the feed for an OsmCha.org filter is served within 7 seconds, thus it can't be followed:

error Failed to create connection: Could not read feed from URL: timeout of 5000ms exceeded.

@Half-Shot
Copy link
Contributor

For reference self hosters can configure this from the config, but users of a public hookshot will need the value tweaked for them. We probably just want to raise the limit to a level we feel comfortable with for integrations.ems.host.

My hunch is there needs to be a balance, to avoid lots of feeds stacking up in the bridge and exhausting our space, so we could raise this to 10s.

@Half-Shot Half-Shot added T-Task Refactoring, enabling or disabling functionality, other engineering tasks. Feeds Involves the RSS feed service. and removed T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements. labels May 24, 2023
@bkil
Copy link
Author

bkil commented May 24, 2023

If HTTP fetching itself (disconnected from parsing & more expensive logic) was implemented in a separate process using parallel worker pools ( #703 #455 ) implemented using a proper language, it would not really be a burden on the hookshot host at all if it just kept tens of thousands of sockets open at a time while it is waiting for TTFB (or even the whole transfer to complete).

In comparison, indeed such timeouts need to be carefully kept under control while each of them is probed on a single thread linearly.

10 seconds sounds like an arbitrary and very conservative limit. Even UDP NAT timeouts usually start out above 30s and many gratis PHP hosts provide for a request serving timeout between 60-120s for scripts uploaded by the user.

Could you perhaps look into your log about the statistics of how many feeds had reached the existing limit (and which timeout would be sufficient for them)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feeds Involves the RSS feed service. T-Task Refactoring, enabling or disabling functionality, other engineering tasks.
Projects
None yet
Development

No branches or pull requests

2 participants