42wim / matterircd

Connect to your mattermost or slack using your IRC-client of choice.
MIT License
295 stars 60 forks source link

Problems connecting due to user listing #252

Closed dansimau closed 4 years ago

dansimau commented 5 years ago

After upgrading from 8e043ed->aae0fc9, I now have trouble connecting. It appears to just hang. I got:

time="2019-05-07T17:18:35+02:00" level=debug msg="trying login with personal token" prefix=matterclient
time="2019-05-07T17:21:11+02:00" level=error msg="login failedGet https://redacted&page=44&per_page=200: net/http: request canceled (Client.Timeout exceeded while awaiting headers)" module=matterircd

I left it for a while another time and it connected after 13 minutes.

I think the issue is loading all the users. Is there a way to architect this so it doesn't need to load users?

42wim commented 5 years ago

The latest commit now supports paging users, you must have a lot of users in a team? I can add a setting so you can specify the amount of users to load in a channel. But at the moment, the only solution is to go back to an older commit.

dansimau commented 5 years ago

Which features require us to load all users preemptively?

The use-cases I can think of are:

I don't really need either so I'm thinking those features could be turned off with a config option.

The alternative would be to only load users on-demand, when needed.

42wim commented 5 years ago

Also needed for the users in a #channel If you have all those users in the same team, those users will also join the #town-square channel by default. Querying 44 pages shouldn't take 13 minutes though, maybe some rate-limiting server side got hit? I'll add an option to disable user loading.

42wim commented 4 years ago

Should be fixed in master, otherwise reopen please.