Re: A couple of questions

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Fri, 29 Jul 2022 17:02:57 +0000

>Thanks so much for your detailed explanation :) the only info I could
>easily get from the uwsgi docs is that if I pass a certain option I
>will have a uwsgi.pid but I don't know what to do with it. Should I
>create a check file by myself? And if yes, what could be a possible
>template? As to 66, there is a key, _at_notify, requiring the right number
>of file descriptors, unfortunately Eric is quite out of reach for
>further information now :)

  pid files are useless, and possibly harmful, when you're running a
service under a supervisor. They're not what you want here.

  From a cursory reading of the uwsgi documentation (which has an insane
amount of options), you can use a hook to run an external command at
various points of the uwsgi lifetime.
  Depending on what exactly you want to do with the thing and how you're
using it, it looks like you could use the "post-app" or "accepting1"
hook
to write a line to a file descriptor of your choice.
  For instance, if your notification-fd file contains 3, and you define
an "echo 1>&3" post-app hook, then your service will be considered ready
when the application has loaded. You don't need to define a data/check
file when not using s6-notifyoncheck, and uwsgi is powerful enough that
you can do without it.

  I'm not going to dive any deeper into the workings of uwsgi, which
looks like a giant blob of bloat and makes me understand why you needed
a five seconds delay for it to get ready. Good luck and, uh, have fun,
I suppose.

--
  Laurent
Received on Fri Jul 29 2022 - 19:02:57 CEST

This archive was generated by hypermail 2.4.0 : Fri Jul 29 2022 - 19:03:26 CEST