Project

General

Profile

Development #13060

Faire tourner fargo sous uwsgi

Added by Josué Kouka over 6 years ago. Updated over 3 years ago.

Status:
Fermé
Priority:
Normal
Assignee:
-
Target version:
Start date:
05 September 2016
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Yes
Planning:
No

Description

-


Files

0001-add-deployment-with-uwsgi-13060.patch (1.42 KB) 0001-add-deployment-with-uwsgi-13060.patch Josué Kouka, 05 September 2016 04:22 PM
0001-add-deployment-with-uwsgi-13060.patch (1.77 KB) 0001-add-deployment-with-uwsgi-13060.patch Josué Kouka, 05 September 2016 04:31 PM
0001-use-uwsgi-fixes-13060.patch (3.4 KB) 0001-use-uwsgi-fixes-13060.patch Benjamin Dauvergne, 08 April 2018 12:03 AM
0001-debian-switch-to-uwsgi-13060.patch (6.08 KB) 0001-debian-switch-to-uwsgi-13060.patch Frédéric Péters, 08 July 2019 09:42 PM

Associated revisions

Revision 6cb9b019 (diff)
Added by Frédéric Péters over 3 years ago

debian: switch to uwsgi (#13060)

History

#1

Updated by Josué Kouka over 6 years ago

#2

Updated by Frédéric Péters over 6 years ago

Il manque au moins une modif aux dépendances, pour déclarer les paquets uwsgi nécessaires à la place de gunicorn (c'est dans debian/control).

#5

Updated by Frédéric Péters over 6 years ago

sep 09 14:59:03 fargo fargo[13442]: open("/usr/lib/uwsgi/plugins/python_plugin.so"): No such file or directory [core/utils.c line 3659]
sep 09 14:59:03 fargo fargo[13442]: !!! UNABLE to load uWSGI plugin: /usr/lib/uwsgi/plugins/python_plugin.so: cannot open shared obje...tory !!!
sep 09 14:59:03 fargo fargo[13442]: /usr/bin/uwsgi: unrecognized option '--module'
sep 09 14:59:03 fargo fargo[13442]: getopt_long() error
sep 09 14:59:03 fargo fargo[13442]: failed!

→ ajouter uwsgi-plugin-python

...
bind(): Cannot assign requested address [core/socket.c line 759]

-BIND=unix:$RUN_DIR/$NAME.sock
+BIND=$RUN_DIR/$NAME.sock

Mais nginx dit "connect() to unix:/var/run/fargo/fargo.sock failed (111: Connection refused)"

La conf de nginx mentionne proxy_pass http://unix:/var/run/fargo/fargo.sock, mais $RUN_DIR/$NAME.sock ça fait /run/fargo/fargo.sock.

BIND=/var/run/$NAME/$NAME.sock

nginx dit désormais "upstream prematurely closed connection while reading response header from upstream,", et uwsgi dit "invalid request block size: 21573 (max 4096)...skip".

Je veux bien un patch testé comme fonctionnant, sur fargo.dev.

#6

Updated by Frédéric Péters over 6 years ago

Pour continuer,

  • modifier le do_start() pour juste faire $DAEMON $DAEMON_ARGS, pas besoin de jouer du start-stop-daemon avec uwsgi
  • modifier le do_stop() pour pareil, faire, $DAEMON --stop $PIDFILE
  • ajouter --buffer-size 32768 dans $DAEMON_ARGS
  • ajouter --chmod-socket=666 pour que nginx puisse y faire quelque chose (il y aurait mieux à faire ici)

Le mode unix socket entre gunicorn et uwsgi semble différent, il n'apparait pas possible de simplement basculer sans modifier les vhosts nginx, il faut passer par uwsgi_pass, ainsi :

        location / {
            include uwsgi_params;
            uwsgi_pass         unix:///var/run/fargo/fargo.sock;
        }

J'ai remis la conf gunicorn en place sur fargo.dev, j'ai laissé le script init.d modifié pour uwsgi dans /root/fargo.uswsgi.init.

#7

Updated by Benjamin Dauvergne almost 6 years ago

  • Status changed from En cours to Nouveau
#8

Updated by Frédéric Péters over 5 years ago

  • Assignee deleted (Josué Kouka)
#9

Updated by Benjamin Dauvergne about 5 years ago

  • Target version set to 0.23
#10

Updated by Frédéric Péters about 5 years ago

  • Target version changed from 0.23 to 0.25
#11

Updated by Benjamin Dauvergne almost 5 years ago

  • Patch proposed changed from Yes to No
#12

Updated by Benjamin Dauvergne almost 5 years ago

Basé sur uwsgi.ini de w.c.s. et commit équivalent sur pétale (ma seule expérience du sujet), #21111.

#13

Updated by Benjamin Dauvergne almost 5 years ago

  • Target version changed from 0.25 to 0.26
#14

Updated by Frédéric Péters about 4 years ago

  • Patch proposed changed from Yes to No

Manque l'uwsgi.ini dans le patch, vérifier que c'est fait comme dans les autres briques déjà basculées.

#15

Updated by Frédéric Péters over 3 years ago

Voilà refait avec tout.

#16

Updated by Benjamin Dauvergne over 3 years ago

Ack.

#17

Updated by Frédéric Péters over 3 years ago

  • Status changed from Solution proposée to Résolu (à déployer)
commit 6cb9b01970064eb6ed702f91558eadeed262c7c7
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Mon Jul 8 21:41:09 2019 +0200

    debian: switch to uwsgi (#13060)
#18

Updated by Frédéric Péters over 3 years ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF