Commit Graph

583 Commits

Author SHA1 Message Date
Klaas van Schelven
123bc41b93 User registration 2024-05-29 15:43:00 +02:00
Klaas van Schelven
cef1127e48 Make user-model swappable
I may just need this later, and doing it this late was already painful enough.
2024-05-29 10:22:57 +02:00
Klaas van Schelven
9b6409f0cd Non-ugly login page 2024-05-27 15:10:01 +02:00
Klaas van Schelven
7cf521ce74 Timed SQLite backend 2024-05-27 14:21:26 +02:00
Klaas van Schelven
9f1be0b001 Document admin dead-end 2024-05-27 13:54:02 +02:00
Klaas van Schelven
e6d27e881f Add process_django_templates to nohup.py 2024-05-27 13:54:02 +02:00
Klaas van Schelven
8a6e721dbd Update sentry SDK dependency
better sooner than later given the extensions; cursory check and
reading the 'breaking changes' seems to indicate: all is well
2024-05-27 13:54:02 +02:00
Klaas van Schelven
a6123e22ac Fail more loudly when sentry sdk experiences network troubles 2024-05-27 13:54:02 +02:00
Klaas van Schelven
4c48376b5f nohub implementations should never cause Exceptions themselves 2024-05-27 13:54:02 +02:00
Klaas van Schelven
29b69e51b8 Add CaptureExceptionsMiddleware 2024-05-27 13:54:02 +02:00
Klaas van Schelven
1be377f962 Explain why LoginRequiredMiddleware.process_view returning an HttpResponse is OK 2024-05-27 13:54:02 +02:00
Klaas van Schelven
c811ddb6fb Don't call the view yourself (and return a result) from process_view
calling the view yourself short-circuits the correct handling, which is not
what we want. It's not abundantly clear from the docs that this is generally
not what we want, but it is cimplied:

> It should return either None or an HttpResponse object. If it returns None,
> Django will continue processing this request, executing any other
> process_view() middleware and, then, the appropriate view. If it returns an
> HttpResponse object, Django won’t bother calling the appropriate view; it’ll
> apply response middleware to that HttpResponse and return the result.

We don't want to do any short-circuiting here, we just want to measure time
and have a view_name to display. Moving stuff around fixes it.

(That this was an error became clear when I wanted to do process_exception
in another Middleware, and that was never called)
2024-05-27 13:54:02 +02:00
Klaas van Schelven
049053cc51 sentry_sdk_extension: nohub 2024-05-27 13:54:02 +02:00
Klaas van Schelven
213d6d9a32 Sentry SDK troubles: document them 2024-05-27 13:54:02 +02:00
Klaas van Schelven
55d1aa463c Yet another version of the cornless business 2024-05-27 13:54:02 +02:00
Klaas van Schelven
b5fbcfa7c8 Add 2 versions of cornless that are useful for sqlite debugging 2024-05-27 13:54:02 +02:00
Klaas van Schelven
082986f8ad Cornless: an interruptable server
does not work for sqlite though, because that c-code does not
regularly check whether signal handling is needed.
2024-05-27 13:54:01 +02:00
Klaas van Schelven
e6403ccfe2 cornless util added 2024-05-23 15:34:13 +02:00
Klaas van Schelven
8b0a4aafe0 Note playground.bugsink findings of get_period_counter initialization 2024-05-23 14:32:30 +02:00
Klaas van Schelven
fb66b04be9 Document playground.bugsink.com performance findings 2024-05-23 14:24:04 +02:00
Klaas van Schelven
4647c1b498 Stress test: better stats 2024-05-23 12:36:14 +02:00
Klaas van Schelven
f0c255a346 Force envelope use in stress tests 2024-05-23 11:02:44 +02:00
Klaas van Schelven
75b620941a Don't (accidentally) load all events into memory on-init 2024-05-23 10:43:28 +02:00
Klaas van Schelven
82d40e3741 Push get_pc_registry into snappea.foreman init 2024-05-23 10:12:24 +02:00
Klaas van Schelven
093f81f2f2 Log 'period counter registry initialization' 2024-05-23 10:08:11 +02:00
Klaas van Schelven
23d7f2172d Add showstat (for snappea queue size) 2024-05-23 08:37:48 +02:00
Klaas van Schelven
aee60969ad Fix typo 2024-05-22 21:02:24 +02:00
Klaas van Schelven
a24c295535 Forgotten file added 2024-05-22 20:57:16 +02:00
Klaas van Schelven
78a85087a2 'performance' info for event bytes count 2024-05-22 20:43:10 +02:00
Klaas van Schelven
5af1d2384e Performance logging of Snappea task create/delete 2024-05-22 17:45:28 +02:00
Klaas van Schelven
34f58f9106 Logging fixes
* only use snappea handler when there was already something configured
* in development, use the 'snappea' rather than the 'look below' version for snappea
2024-05-22 17:34:29 +02:00
Klaas van Schelven
e331ef6d79 Clarify development loggers somewhat 2024-05-22 17:12:19 +02:00
Klaas van Schelven
151af98559 Performance logging: push into development.py (i.e. remove from non-development servers) 2024-05-22 17:06:21 +02:00
Klaas van Schelven
9f53ba5a8f Remove timestamps from default snappea
e.g. systemd otherwise has double timestamps
2024-05-22 13:08:24 +02:00
Klaas van Schelven
4624c1d88c Default max request size: also nginx-side 2024-05-22 13:02:51 +02:00
Klaas van Schelven
b09cfb21c3 Configure runsnappea to be rebooted every day
a way to limit memory leaks

also: deal with SIGTERM 'correctly' (i.e. as demanded by systemd)
2024-05-22 12:44:58 +02:00
Klaas van Schelven
9fcbfb9033 Add templates for 404, 500 2024-05-22 09:37:51 +02:00
Klaas van Schelven
7c760ba546 Remove RuntimeDirectory from runsnappea systemd example conf 2024-05-22 09:24:53 +02:00
Klaas van Schelven
529a7a7c9f runssnappea as a separate command (for e.g. ps) 2024-05-22 09:23:31 +02:00
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