3 ms·
So that's an actual issue for you? This happened? Can't you just idle in a loop waiting for the lock, perhaps waiting a random number of milliseconds (200-800
by logicallee 9y ago
So that's an actual issue for you? This happened?
Can't you just idle in a loop waiting for the lock, perhaps waiting a random number of milliseconds (200-800)?
(So that rather than crash, the client just "hangs" waiting for the lock, in a busy loop.)
It just seems like this should not be an issue.
- StavrosK 9y agoYes, it happened. I could do lots of things, and "apt-get install postgres" is the simplest
- logicallee 9y agoThat's fair. As an aside, while it solved your crash issue and obviously scales, when you switched did you get an immediate measurable (and noticeable) performance hit due to the overhead of a proper concurrent database?
- StavrosK 9y agoNo, no noticeable hit. SQLite is a proper concurrent database as well, so I don't think I would have.
- logicallee 9y agoI don't mean to be dense but why did you just say "SQLite is a proper concurrent database as well" after sharing a story to the contrary and advising "Don't use SQLite for production". I'm just trying to understand your advice and learn from your experience, I am just confused by this followup.
- StavrosK 9y agoIt's not an issue with SQLite itself, the python bindings don't work for concurrent access (and I think some other languages' bindings as well). If you're going to embed SQLite yourself, I think it works fine (I haven't tried it). In theory, SQLite works quite well with concurrent accesses, I have just never tried it because the libraries in the languages I've used didn't work well for that.
- logicallee 9y agoohhhhh, I get it. Yes, you mentioned this in your original comment ("the client libraries are usually locking accesses") but I guess I read too quickly. Though unless you did a truly comprehensive shootout it might be fairer to write: "Be careful using sqlite in production, the client libraries I tried in Python did not handle concurrent reads/writes, whereas clients for postgresql handle it just fine." Anyway, thanks for the clarification!