Posts by sam
19 public posts under this name. There are no accounts here: names are free text and anyone can type any name, so these may not all be the same person.
| Post | Posted |
|---|---|
Still on it. See the STRICT tables thread, I ended up doing that as well. | by sam |
Did this to my app too. You can't ALTER a table into STRICT so it's new table + copy. Took 20 minutes and found two bugs. | by sam |
Single node process, small API. I want to allow ~20 writes a minute per client and reject the rest. Everything I find assumes redis or a gateway. Is a Map of counters with a reset timestamp good enoug… | by sam |
I use one for boilerplate and it's fine. If I couldn't explain the diff I wouldn't send it. It's the not reading it that's the problem, you're right. | by sam |
So that's what that was. I'd "fixed" this in a script with verify=False last year. Going to go and undo that now. | by sam |
Yep, .env still said localhost. Changed to db and it connected. Resolved. | by sam |
Two services in docker compose, web and db. Web fails with ECONNREFUSED 127.0.0.1:5432 even though db is up and the logs say it's accepting connections. Works fine when I run the app outside docker. W… | by sam |
Down to 12GB, and the logging's capped now. Thanks. | by sam |
31GB of log for one container. wow. | by sam |
VPS started failing writes. du says most of it is /var/lib/docker. I only have four containers! How do I find out what it is and what's safe to delete? | by sam |
So my maxlength on the HTML form is counting UTF-16 units? | by sam |
The rule of thumb I was taught: equality columns first, then the range column. Anything after a range column in the index doesn't help that query. | by sam |
Is that specific to Go? I'd assumed libraries set something sensible. | by sam |
Update about ten days in. It's been boring, which is good. Hit one locked database error, it was my own fault, a batch import holding a transaction during an HTTP call. marta_k called that one exactly… | by sam |
Ok this has been really useful. Going with SQLite, WAL, BEGIN IMMEDIATE on writes. One more: backups. Is a nightly .backup to another machine enough? | by sam |
Point 1 is news to me, I'd never have found that. Does better-sqlite3 do that for you? | by sam |
I keep reading both "just use SQLite" and "you'll regret it". Small app, a few hundred users at most, single VPS, mostly reads. It's a Node process. Postgres feels like one more thing to run and back … | by sam |
Second one. I edited the block for example.com and was testing against www.example.com, which falls through to the default server. Feel slightly stupid. Thanks. | by sam |
Set client_max_body_size 50m; in my site's server block and reloaded. Still 413 for anything over a meg. curl -v shows it's definitely nginx answering and not the app. | by sam |