What did you expect to happen?
atuin sync with large entities should succeed (or at least not error out).
What happened?
I had some history entries in my database that exceeded 4kB (even 8kB), causing the sync to error out with a HTTP 413 Content Too Large.
~ % atuin sync
Uploading 18979 records to <redacted>/history
2025-08-25T07:11:15.599671Z ERROR atuin_client::record::sync: failed to post records: There was an error with the atuin sync service: Status 413.
If the problem persists, contact the host
Location:
/private/tmp/atuin-20250804-8800-rmph0g/atuin-18.8.0/crates/atuin-client/src/api_client.rs:186:9
Error: a request to the sync server failed: "There was an error with the atuin sync service: Status 413.\nIf the problem persists, contact the host"
Location:
crates/atuin/src/command/client/store/push.rs:90:29
~ %
Fix was to first prune these from my history.db (delete from history where length(command) > ...) and (re)move my records.db.
I suggest multiple things:
The server should reject large entities in a controlled manner. The 413 was followed by a 503 Service Unavailable so I suppose the server crashed? (I haven't verified this). Still, a better error message would be helpful.
The client should handle this sync error more gracefully - maybe mark this record as not accepted by the server and move on?
In addition, a configuration option to filter out history entries by size would be nice. Nobody (or, at least, I) needs base64 encoded JPEGs in their history.
Atuin doctor output
Atuin Doctor
Checking for diagnostics
Please include the output below with any bug reports or issues
{
"atuin": {
"version": "18.8.0",
"sync": {
"cloud": true,
"records": true,
"auto_sync": true,
"last_sync": "2025-08-25 7:25:16.3285 +00:00:00"
},
"sqlite_version": "3.46.0"
},
"shell": {
"name": "zsh",
"default": "zsh",
"plugins": [
"atuin"
],
"preexec": "built-in"
},
"system": {
"os": "Darwin",
"arch": "arm64",
"version": "15.6.1",
"disks": [
{
"name": "Macintosh HD",
"filesystem": "apfs"
},
{
"name": "Macintosh HD",
"filesystem": "apfs"
}
]
}
}
Code of Conduct
What did you expect to happen?
atuin syncwith large entities should succeed (or at least not error out).What happened?
I had some history entries in my database that exceeded 4kB (even 8kB), causing the sync to error out with a
HTTP 413 Content Too Large.Fix was to first prune these from my
history.db(delete from history where length(command) > ...) and (re)move myrecords.db.I suggest multiple things:
The server should reject large entities in a controlled manner. The
413was followed by a503 Service Unavailableso I suppose the server crashed? (I haven't verified this). Still, a better error message would be helpful.The client should handle this sync error more gracefully - maybe mark this record as
not accepted by the serverand move on?In addition, a configuration option to filter out history entries by size would be nice. Nobody (or, at least, I) needs base64 encoded JPEGs in their history.
Atuin doctor output
Code of Conduct