Commit Graph

544 Commits

Author SHA1 Message Date
Klaas van Schelven bf0855b11d Gunicorn: max-requests
just picked 'some reasonably seeming value' to avoid memory leaks (which I've not
observed yet, but are easily imagined)
2024-05-22 08:43:57 +02:00
Klaas van Schelven f150c839dc Recommended setup: fix tmpfile troubles in 2 ways
* recommend to just run in the home dir
* don't use private tmp

The troubles were: when set up using private tmp files, the 2 processes
cannot communicate with each other
2024-05-22 08:37:52 +02:00
Klaas van Schelven d4c74c22f8 In the recommended setup, just use port 8000
simplify simplify simplify. In particular, this creates a symmetry with a 'just run
manage.py runserver', which could be used for debugging

Also, turns out sockets aren't actually faster:
https://stackoverflow.com/a/54013893/339144

> In this particular setup no unix socket performance advantage.
2024-05-22 08:30:16 +02:00
Klaas van Schelven c92e3ec772 Add INGEST_STORE_BASE_DIR 2024-05-20 09:44:38 +02:00
Klaas van Schelven 653bbe0dd2 Remove 'default' conf; it doesn't really map to any particular idea we express in the docs 2024-05-20 09:27:50 +02:00
Klaas van Schelven 53353d2d8c Add some more percentiles 2024-05-19 15:36:27 +02:00
Klaas van Schelven 4b5f1371ed docs: Add server_name to the 443 server too
this is needed when you have multiple servers on the same host
i.e. I ran into it when running munin on the same server
2024-05-18 08:24:36 +02:00
Klaas van Schelven 89dba6e6e5 Fix typo 2024-05-17 15:52:43 +02:00
Klaas van Schelven 0d1f966914 Header configuration: settings-side to correspond with the recommended setup 2024-05-17 12:30:10 +02:00
Klaas van Schelven 371c86b552 Docs for single-server: cleanup by doing a full replay 2024-05-17 12:23:17 +02:00
Klaas van Schelven 5ff2623112 Add checksnappea command 2024-05-17 12:03:40 +02:00
Klaas van Schelven d2ba9b9ddb Add missing migration 2024-05-17 10:14:09 +02:00
Klaas van Schelven 769e413d28 (WIP) docs for and DDD for single-server deployment 2024-05-16 21:56:39 +02:00
Klaas van Schelven cb62ec7c58 Docs; WIP for single-server-deployment 2024-05-16 13:11:19 +02:00
Klaas van Schelven ee228a681d Project 'view on site' button 2024-05-16 10:36:55 +02:00
Klaas van Schelven 0f0a4f996c DDD: whitenoise
Why?

> One is that WhiteNoise is designed to work in situations where Apache, nginx
> and the like aren’t easily available. But more importantly, it’s easy to
> underestimate what’s involved in serving static files correctly

We deal with both these situations:

* for local development, we recommend running with DEBUG=False and still want to
  sever staticfiles

* for deploying using nginx/whatever, I'd like to keep my instructions as simple
  as possible, and doing this right once (in whitenoise) saves us from having to
  come up with the right instructions for a bunch of webservers.
2024-05-16 10:31:59 +02:00
Klaas van Schelven 6c9cc2ab4f Remove asgi.py
we don't do ASGI, let's not have this hanging around as a point of confusion
2024-05-16 10:10:42 +02:00
Klaas van Schelven 5bc3a54e71 Documentation Driven Development: getting started guide
excluding static files
2024-05-16 10:09:55 +02:00
Klaas van Schelven f07e5aa322 Add show-version command 2024-05-16 09:14:47 +02:00
Klaas van Schelven 7a6dc42478 First version of local-install tutorial 2024-05-16 09:08:15 +02:00
Klaas van Schelven 26d2cddee9 Don't put DB in source-code-root by default 2024-05-15 13:50:18 +02:00
Klaas van Schelven c1fdb3b591 Proof of Concept for pyproject.toml 2024-05-15 13:32:11 +02:00
Klaas van Schelven 6f9706c85b Add LICENCE file (that points to not-yet-defined terms) 2024-05-14 22:14:14 +02:00
Klaas van Schelven 3e2b6965f9 settings/development.py and create_example_conf working 2024-05-14 11:24:59 +02:00
Klaas van Schelven 0863284a50 WIP (midway checkin): create_example_conf.py 2024-05-13 23:07:20 +02:00
Klaas van Schelven f2de61b273 Use app_settings for Bugsink-specific stuff
something about consistency
2024-05-13 15:09:35 +02:00
Klaas van Schelven 24917b3324 Rename for clarity 2024-05-13 14:57:47 +02:00
Klaas van Schelven de6bb90385 Clarify a comment 2024-05-13 14:47:12 +02:00
Klaas van Schelven f72b2522b8 Use tailwind_preload_css
> The tag generates a preload directive for your stylesheet, which improves
> loading performance in production. Place it above the {% tailwind_css %} tag:

See e.g. https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preload

For a brief moment I thought that this was malfunctioning, because it is missing
the ?v=... part, but that part is DEBUG-only, so we don't care about it for real
use-cases
2024-05-13 14:33:25 +02:00
Klaas van Schelven 1a264675c2 'python manage.py tailwind build' as a pre-commit hook 2024-05-13 14:25:53 +02:00
Klaas van Schelven 86b775aabc In non-debug, make sure logging ends up on stdout too 2024-04-27 22:09:59 +02:00
Klaas van Schelven 46220f97ea Snappea: 'ensure' it is running as a singleton 2024-04-27 21:59:20 +02:00
Klaas van Schelven 1d18bdd9ed Preserve design-thought about snappea 2024-04-27 21:44:34 +02:00
Klaas van Schelven 12acd2c950 Add test for digest-non-immediate 2024-04-27 21:39:56 +02:00
Klaas van Schelven ab791941ed Add test for envelope ingestion 2024-04-27 21:24:25 +02:00
Klaas van Schelven 7e32893b78 Fix the store endpoint (but always DIGEST_IMMEDIATELY) 2024-04-27 21:13:29 +02:00
Klaas van Schelven 2ddb773c6b Remove temp files after delayed digestion 2024-04-27 20:48:43 +02:00
Klaas van Schelven 4b509ac13b Stress test: print some stats 2024-04-27 20:45:59 +02:00
Klaas van Schelven 8d23239526 Be more strict about usage of TransactionTestCase in tests 2024-04-27 20:35:35 +02:00
Klaas van Schelven 2e6be5cbe7 Wrap Task.objects.all() call in a transaction 2024-04-27 11:07:23 +02:00
Klaas van Schelven 4a6196c267 Leave TODO about pc_registry and multi-process setups 2024-04-26 20:56:56 +02:00
Klaas van Schelven b261c21a61 Clarify the meaning of Django's savepoint argument 2024-04-26 20:51:19 +02:00
Klaas van Schelven 653f4381c1 Add comment on transaction serializability 2024-04-26 20:45:55 +02:00
Klaas van Schelven 61d5615d5d Add stress-test command (using copy/paste from send_json) 2024-04-26 16:11:38 +02:00
Klaas van Schelven 40fecc20fd Remove old setting name 2024-04-26 16:11:20 +02:00
Klaas van Schelven c87582fba6 Don't fsync
It's (very, in the order of 10ms) costly.
As I understand it now: the reason is for durability in case of power outages. But that's not
what we're looking for here. We merely want "available in another process". Which I think should
just be the case after a flush().
2024-04-26 15:26:41 +02:00
Klaas van Schelven 58435754e0 Digest immediately implemented 2024-04-26 14:48:07 +02:00
Klaas van Schelven c8053bfec4 Do not allow immediate_atomic to run in non-Transactional testcase 2024-04-26 13:40:19 +02:00
Klaas van Schelven 6b5ed1268a Add missing file 2024-04-26 12:21:25 +02:00
Klaas van Schelven 7bfad36376 Implement brotli decompression 2024-04-25 15:56:11 +02:00