diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2021-12-21 00:51:45 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2021-12-21 00:51:45 +0100 |
commit | 8f9f754271bb0aa261c4b500868cc37ebcab9b8c (patch) | |
tree | 9b3bca16ca7b6c7d5c42ae7a73e2e97ac9b81648 | |
parent | 6aaba55b8dd015397da2374fe85e9efda79c918e (diff) | |
download | nixpkgs-8f9f754271bb0aa261c4b500868cc37ebcab9b8c.tar nixpkgs-8f9f754271bb0aa261c4b500868cc37ebcab9b8c.tar.gz nixpkgs-8f9f754271bb0aa261c4b500868cc37ebcab9b8c.tar.bz2 nixpkgs-8f9f754271bb0aa261c4b500868cc37ebcab9b8c.tar.lz nixpkgs-8f9f754271bb0aa261c4b500868cc37ebcab9b8c.tar.xz nixpkgs-8f9f754271bb0aa261c4b500868cc37ebcab9b8c.tar.zst nixpkgs-8f9f754271bb0aa261c4b500868cc37ebcab9b8c.zip |
nixos/privacyidea: increase buffer-size of uwsgi from 4096 to 8192
When accessing the Audit log, I get an HTTP 502 when the frontend requests `/audit` and I get the following error in my `nginx`-log: Dec 20 22:12:48 ldap nginx[336]: 2021/12/20 22:12:48 [error] 336#336: *8421 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 10.237.0.1, server: _, request: "GET /audit/?action=**&action_detail=**&administrator=**&client=**&date=**&duration=**&info=**&page=1&page_size=10&policies=**&privacyidea_server=**&realm=**&resolver=**&serial=**&sortorder=desc&startdate=**&success=**&tokentype=**&user=** HTTP/1.1", upstream: "uwsgi://unix:/run/privacyidea/socket:", host: "ldap.ist.nicht-so.sexy", referrer: "https://ldap.ist.nicht-so.sexy/" This is because of an "invalid request block size"-error according to `journalctl -u privacyidea.service`: Dec 20 22:12:48 ldap uwsgi[10721]: invalid request block size: 4245 (max 4096)...skip Increasing the buffer to 8192 fixes the problem for me.
-rw-r--r-- | nixos/modules/services/security/privacyidea.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/services/security/privacyidea.nix b/nixos/modules/services/security/privacyidea.nix index dacbffec04e..b8e2d9a8b0d 100644 --- a/nixos/modules/services/security/privacyidea.nix +++ b/nixos/modules/services/security/privacyidea.nix @@ -204,6 +204,7 @@ in systemd.services.privacyidea = let piuwsgi = pkgs.writeText "uwsgi.json" (builtins.toJSON { uwsgi = { + buffer-size = 8192; plugins = [ "python3" ]; pythonpath = "${penv}/${uwsgi.python3.sitePackages}"; socket = "/run/privacyidea/socket"; |