rebuilderd icon indicating copy to clipboard operation
rebuilderd copied to clipboard

SQLite tracking issue

Open kpcyrd opened this issue 4 years ago • 3 comments

To avoid having difficult to configure external dependencies we've decided to use sqlite to track the rebuilderd state. We had some starting issues with sqlite locking up. It got better but still isn't fully resolved. The python ecosystems seems to have this figured out.

The error shows up as:

[2020-04-16T02:42:53Z ERROR r2d2] database is locked

or

[2020-04-20T11:34:08Z ERROR actix_http::response] Internal Server Error: DatabaseError(__Unknown, "database is locked")
[2020-04-20T11:34:08Z INFO  actix_web::middleware::logger] 127.0.0.1:45710 "POST /api/v0/build/ping HTTP/1.1" 500 18 "-" "-" 0.251571

There has been some prior discussion in https://github.com/diesel-rs/diesel/issues/2365

kpcyrd avatar Apr 20 '20 17:04 kpcyrd

I'm having this issue I think. Is there a way to figure out what could be wrong/how to unlock the db?

Jun 02 19:56:02 tsel docker[1248333]: [2022-06-02T19:56:02Z ERROR actix_http::response] Internal Server Error: Error { err: database is locked }

SantiagoTorres avatar Jun 02 '22 19:06 SantiagoTorres

This still happens if one operation locks up the database for a very long time. One operation that can take a long time with many builds/packages is the garbage collection of old builds, I've created #131 for this.

kpcyrd avatar Jun 02 '22 23:06 kpcyrd

ah, now I realize it's not a permanent lockup. Things are working now :) thanks!

SantiagoTorres avatar Jun 03 '22 15:06 SantiagoTorres