News for hackers. Stuff that matters.
Re:Django SQLite Production Config by baq on Saturday June 15, 2024 @07:23AM (#40689045)
I love this story because it shows you really should read some docs about your storage layer before you jump in head first and just assume it’ll work forever and/or gracefully handle any load including overload. Postgres is the same, it’ll work until it won’t, in some case it’ll break in a way you can’t recover from without stopping production for a long time. (You can guess how I know - you’re right, I didn’t read the relevant part of the manual.)

Read your database’s manual, people! Even just going through the table of contents will put you in the top 20%.

Re:Django SQLite Production Config by stavros on Saturday June 15, 2024 @07:53AM (#40689200)
Well, maybe the database should have more suitable defaults? Arguably, slowing down a bit once when the WAL grows beyond X MB to clean it up is better behavior than having it grow unboundedly, but maybe that's not possible.
Re:Django SQLite Production Config by kmac_ on Saturday June 15, 2024 @08:38AM (#40689417)
There is no one-size-fits-all solution in the SQL world, and using SQLite in such a scenario is not a good idea. SQLite is an embedded database for embedded use. Even PostgreSQL is not universal, as many people assume. For use cases like analytics, there are many better-suited database engines.
Re:Django SQLite Production Config by stavros on Saturday June 15, 2024 @08:40AM (#40689428)
Sure, but there are one-size-fits-95% solutions, and they're better than one-size-fits-90% solutions.
Re:Django SQLite Production Config by kmac_ on Saturday June 15, 2024 @09:43AM (#40689756)
Absolutely agree. As most projects are small or medium in size, PostgreSQL is a good default choice. Problems arise when the problem does not fit the solution or tool. For example, using SQLite for high-volume transactions and then complaining that it doesn't work.
Re:Django SQLite Production Config by belter on Saturday June 15, 2024 @07:47AM (#40689167)
> you can’t recover from without stopping production for a long time.

Should that not be addressed at the level of Architectural design of your System? Everything fails all the time...bla bla....and all that?

Re:Django SQLite Production Config by baq on Saturday June 15, 2024 @07:57AM (#40689212)
If the system is small enough for a single postgres (which let's be honest 99% of them are) and short maintenance downtimes are easily tolerated by customers it's easy to forget about some failure modes and especially if you haven't been on the receiving end of such an incident. An experienced DBA would also notice the problem if only because they've been resolving a few of them in their professional past (hence 'experienced').