atuin
atuin copied to clipboard
atuin server randomly crashes when running for a while
My atuin server frequently crashes with the following error:
ERROR atuin_server::handlers::history > failed to add history: error returned from database: value too long for type character varying(8192)
I think I have multiple entries in my history which have a base64 compressed length of 7500 characters. This is probably to much combined with the encrpyted data. Is there an easy way I could delete such entries from my history? Or should I patch atuin to increase the size of this field?
I'd be happy to increase the max size of this field, as I doubt you'll be the only one running into this problem! Perhaps 16,384?
We'd need to create another database migration, but beyond that there shouldn't be much else required
The history entries that are causing trouble are base64 strings which I decoded. I think in addition to that we should strip or ignore to long commands to prevent further issues like this.
Need some thinking around proper validation here, we can't just ignore insertions because then remote/local have different history + won't sync very well
For now I've partly mitigated this in #321, and will see how this goes
First of all, the server should never crash on invalid/malformed/whatever input, that’s DoS vulnerability.
First of all, the server should never crash on invalid/malformed/whatever input, that’s DoS vulnerability.
The server doesn't actually crash on a long entry, but the handler does error out.
@SuperSandro2000 I've just merged #447 which should help you out - you can try increasing max_history_length to some larger value that suits your needs, or set it to 0 if you trust everyone with an account on your server (then history length is unrestricted)
I am already happy if the handler is no longer crashing.
It doesn’t crash, just logs an error that the input is invalid :)
On Sat, May 14, 2022 at 01:35, Jakub Jirutka @.***> wrote:
First of all, the server should never crash on invalid/malformed/whatever input, that’s DoS vulnerability.
— Reply to this email directly, view it on GitHub https://github.com/ellie/atuin/issues/272#issuecomment-1126593716, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMWYN3VOLTCHK6G4QXK7OEDVJ3YORANCNFSM5NF3WIXQ . You are receiving this because you commented.Message ID: @.***>