NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.37k stars 13.6k forks source link

TandoorRecipes: failing to save images (to sql database) #200219

Open benneti opened 1 year ago

benneti commented 1 year ago

Describe the bug

Everything works but saving an image crashes the worker. See related https://github.com/TandoorRecipes/recipes/issues/2137 .

Steps To Reproduce

Steps to reproduce the behavior:

  1. enable and configure tandoor recipes (with postgresql)
  2. save some recipes
  3. try to upload a picture (it was working and then broke)

Expected behavior

Reliably upload pictures. According to upstream this is most likely a configuration problem https://github.com/TandoorRecipes/recipes/issues/2137 .

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

The weird part is that the file is actually uploaded (with incorrect name though) and the database can be accessed, too (as everything else works). I think it might be a problem with one of the dependency libraries, but I do not know how to debug this and would appreciate some help. The log only states that the worker crashes

Nov 02 11:43:00 HOSTNAME systemd[1]: Starting Tandoor Recipes server...
Nov 02 11:43:05 HOSTNAME tandoor-recipes-pre-start[601599]: Operations to perform:
Nov 02 11:43:05 HOSTNAME tandoor-recipes-pre-start[601599]:   Apply all migrations: account, admin, auth, authtoken, contenttypes, cookbook, oauth2_provider, sessions, sites, socialaccount
Nov 02 11:43:05 HOSTNAME tandoor-recipes-pre-start[601599]: Running migrations:
Nov 02 11:43:05 HOSTNAME tandoor-recipes-pre-start[601599]:   No migrations to apply.
Nov 02 11:43:05 HOSTNAME systemd[1]: Started Tandoor Recipes server.
Nov 02 11:43:06 HOSTNAME gunicorn[601746]: [2022-11-02 11:43:06 +0100] [601746] [INFO] Starting gunicorn 20.1.0
Nov 02 11:43:06 HOSTNAME gunicorn[601746]: [2022-11-02 11:43:06 +0100] [601746] [INFO] Listening at: unix:/run/tandor-recipes/tandor-recipes.sock (601746)
Nov 02 11:43:06 HOSTNAME gunicorn[601746]: [2022-11-02 11:43:06 +0100] [601746] [INFO] Using worker: sync
Nov 02 11:43:06 HOSTNAME gunicorn[601760]: [2022-11-02 11:43:06 +0100] [601760] [INFO] Booting worker with pid: 601760
Nov 02 11:45:12 HOSTNAME gunicorn[601746]: [2022-11-02 11:45:12 +0100] [601746] [WARNING] Worker with pid 601760 was terminated due to signal 31
Nov 02 11:45:12 HOSTNAME gunicorn[602204]: [2022-11-02 11:45:12 +0100] [602204] [INFO] Booting worker with pid: 602204

Notify maintainers

@ambroisie

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
this path will be fetched (0.06 MiB download, 0.30 MiB unpacked):
  /nix/store/x8mymrkpsmpwyvqssjbwsq851kscf1kw-bash-interactive-5.1-p16-dev
copying path '/nix/store/x8mymrkpsmpwyvqssjbwsq851kscf1kw-bash-interactive-5.1-p16-dev' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.74, NixOS, 22.05 (Quokka), 22.05.20221105.f09ad46`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.9.1`
 - nixpkgs: `/nix/store/da9dyx30lsdgw2x2gnxkc88aq1d9fwik-source`
yapvoonyee commented 3 months ago

I have the same problem. I did a fix to fix the images, which worked. But then when I tried to upload an image all the images broke.

$ nix-shell -p nix-info --run "nix-info -m" this path will be fetched (0.01 MiB download, 0.05 MiB unpacked): /nix/store/xfhkjnpqjwlf6hlk1ysmq3aaq80f3bjj-stdenv-linux copying path '/nix/store/xfhkjnpqjwlf6hlk1ysmq3aaq80f3bjj-stdenv-linux' from 'https://cache.nixos.org'...

ambroisie commented 3 months ago

Hmm I don't remember having the issue, but I've mostly transitioned to using Mealie instead of Tandoor-Recipes...