strfry icon indicating copy to clipboard operation
strfry copied to clipboard

Add timeout config for router.

Open braydonf opened this issue 1 year ago • 1 comments

A few changes to work with configuration files created by strfry-tools, this can include hundreds of streams based upon the kind 3 follows/contacts of an npub and kind 10002 relay list metadata for each contact.

Related: https://github.com/hoytech/strfry/issues/45#issuecomment-2375257005

braydonf avatar Oct 04 '24 00:10 braydonf

I tested running several concurrent strfry router cmds together (180+) and ran into an issue with too many open files. It didn't look like strfry router had a threadpool yet, so adding this could also likely help.

braydonf avatar Oct 04 '24 22:10 braydonf

I'll leave out the thread pool for this PR. Currently using this branch for my relay.

braydonf avatar Oct 11 '24 03:10 braydonf

@braydonf - I renamed the param to connectionTimeout instead of timeout (in case we ever support different types of timeouts). I also refactored slightly and added some docs. Thanks again!

hoytech avatar Oct 18 '24 20:10 hoytech

Great, thanks! And also the config reloading, forgot that was something to think about.

braydonf avatar Oct 21 '24 20:10 braydonf