Closed JakeStanger closed 1 year ago
My Discord crashes every time I sleep/wake the computer, and occasionally for no good reason whatsoever, so I run into this a lot.
It looks like the underlying discord-presence
crate doesn't surface the connection errors very well, so I'll open an issue there.
EDIT: Issue here: https://github.com/jewlexx/discord-presence/issues/62
The above has been fixed and the library updated, so this is now resolved on master
here.
I have noticed however that the connection retry logic in the library currently has no chill and really spams the socket/log, so I'm waiting for https://github.com/jewlexx/discord-presence/pull/73 to be merged before getting a release out or closing this.
I've managed to fix my Discord crashing on sleep/wake, which is itself a huge win, but yeah at boot time I think the systemd service starts before Discord so needs to be restarted every boot. All that to say that this is less of a worry than it used to be but still happens, and I'm super pleased to hear there are fixes in the works. Thanks!
I do not get crashes, and I can restart discord fine, but the mentioned logging issue is causing a rather high rate of I/O on an SSD with BTRFS.
My journalctl -b log file for the last 6 hours - of a mostly idle machine - is 1.1GB in size, 5,383,274 lines long, with 5,375,627 occurrences of the words 'discord' and 'rpc.' I looked into it because I happened to be investigating I/O for other reasons. I'm not quite sure this even with the write amplification of BTRFS this can explain an unaccounted for 12.6GB+ of writes, but I suppose I will test presently...
It will retry and log as fast as your hardware can handle at the moment, so it will add up very quickly.
Supposedly everything is in place in the discord library, so I'm hoping to get time this weekend to have another look and get it sorted.
This is now fully resolved in the latest master.
I'm waiting on discord-presence
to get a release out before I do the same, as this relies on the package's master branch currently.
If Discord restarts or the connection to its RPC server drops for whatever reason, the program crashes.