Lib.rs link not opening

https://lib.rs/crates/cranefack

why is this not opening? we can search for cranefack in lib.rs and it shows up, yet clicking it does not work. why?

Looks like corruption.

@kornel

error[E0500]: lib.rs:1
Sorry, something went wrong!

bad cache: Simple cache db @file:/var/lib/crates-server/cratesiometadb.bin?cache=shared: database disk image is malformed

    bad cache: Simple cache db @file:/var/lib/crates-server/cratesiometadb.bin?cache=shared: database disk image is malformed

Try refreshing the page.
Back to homepage.

Yup. I've disabled fsync in sqlite foolishly hoping it'd make it faster, and that's the consequence.
I've restored a backup and it should be fine now.

4 Likes

As an aside, I find it awesome that you apparently also have the courage for using SQLite as a serious database for a webservice. I almost thought I was alone being annoyed with having to set up a DB server even when the scale doesn't warrant it, but I was told so many times by so many programmers that "SQLite simply won't cut it" as a "real" backend DB.

It's even funnier than that. I store most of lib.rs data in a HashMap serialized with serde on disk. To change something I read gigabytes of data into memory, make the changes, and write all the gigabytes back to disk. With SSD speeds in GB/s even the worst way of doing things is fast.

All of the stats are also pure Rust for loops going over all the data, not SQL queries.

5 Likes

That reminds me of tailscale which did exactly the same before having to migrate to sqlite etcd due to performance reasons. See An unlikely database migration · Tailscale