[Labs-l] bit of help with recitation-bot

Anthony Di Franco di.franco at gmail.com
Fri Aug 19 21:11:29 UTC 2016


As the web component is basically a thin admin interface for a background
service and the web part will have zero load / reliability concerns, I am
not too worried about using the built-in flask server, but it would be nice
regardless to get uwsgi working. I put the uwsgi.ini in the project home in
accordance with the instructions here
<https://wikitech.wikimedia.org/w/index.php?title=Help:Tool_Labs/Web&oldid=796257#Python_.28uwsgi-plain.29>,
does it actually belong in ~/www/python as you said?

On Fri, Aug 19, 2016 at 1:55 PM Yuvi Panda <yuvipanda at gmail.com> wrote:

> Using the flask server directly for production uses is heavily
> discouraged by the flask community. There's a bunch of options you can
> try to pass to uwsgi (you can create an ini file in
> ~/www/python/uwsg.ini and put them there) that should make it work
> better (https://github.com/unbit/uwsgi/issues/206 came up, am sure
> there are others).
>
> On Fri, Aug 19, 2016 at 1:45 PM, Anthony Di Franco <di.franco at gmail.com>
> wrote:
> > I don't think I can use uwsgi at all, since it seems to be conflicting
> with
> > my own use of multiprocessing and causing the hanging, so I switched to
> the
> > generic runner. I tried configuring uwsgi to enable threading and use a
> > single process and thread but that didn't work. But I might try again to
> get
> > it working later.
> >
> > On Fri, Aug 19, 2016 at 9:28 AM Yuvi Panda <yuvipanda at gmail.com> wrote:
> >>
> >> Hello! I'll investigate the bug! In the meantime, can you try using
> >>
> >>
> https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Web/Kubernetes#python_.28uwsgi_.2B_python3.4.29
> >> instead of uwsgi-plain for python3.4? I'll amend the documentation
> >> shortly to refer to this directly as well...
> >>
> >> On Fri, Aug 19, 2016 at 4:47 AM, Merlijn van Deen (valhallasw)
> >> <valhallasw at arctus.nl> wrote:
> >> > I'm not sure -- sounds like a bug! I've filed
> >> > https://phabricator.wikimedia.org/T143403 .
> >> >
> >> > Merlijn
> >> >
> >> > On 19 August 2016 at 11:32, Anthony Di Franco <di.franco at gmail.com>
> >> > wrote:
> >> >>
> >> >> One more question, I am using the generic webservice method since I
> >> >> need
> >> >> to do this to avoid the previous issue, but I seem to be running into
> >> >> an
> >> >> issue with the scripts, or doing something wrong in following
> >> >>
> >> >>
> https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Web#Other_.2F_generic_web_servers
> >> >> ( see below )
> >> >>
> >> >> (new-env)tools.recitation-bot at tools-bastion-03:~$ webservice generic
> >> >> start
> >> >> /data/project/recitation-bot/new-bot/labs-startup.sh
> >> >> Starting webservice.
> >> >> (new-env)tools.recitation-bot at tools-bastion-03:~$ tail error.log
> >> >> usage: webservice-runner [-h]
> >> >>                          [--type
> >> >>
> >> >>
> {tomcat,nodejs,generic,lighttpd,lighttpd-precise,lighttpd-plain,uwsgi-plain,uwsgi-python}]
> >> >>                          [--extra_args EXTRA_ARGS] [--port PORT]
> >> >>                          [--register-proxy]
> >> >> webservice-runner: error: unrecognized arguments: --extra-args
> >> >> /data/project/recitation-bot/new-bot/labs-startup.sh
> >> >> usage: webservice-runner [-h]
> >> >>                          [--type
> >> >>
> >> >>
> {tomcat,nodejs,generic,lighttpd,lighttpd-precise,lighttpd-plain,uwsgi-plain,uwsgi-python}]
> >> >>                          [--extra_args EXTRA_ARGS] [--port PORT]
> >> >>                          [--register-proxy]
> >> >> webservice-runner: error: unrecognized arguments: --extra-args
> >> >> /data/project/recitation-bot/new-bot/labs-startup.sh
> >> >>
> >> >>
> >> >> On Thu, Aug 18, 2016 at 2:33 AM Merlijn van Deen (valhallasw)
> >> >> <valhallasw at arctus.nl> wrote:
> >> >>>
> >> >>> Hi Anthony,
> >> >>>
> >> >>> I've killed the jobs for you, and have restarted the webservice with
> >> >>> webservice uwsgi-plain start.
> >> >>>
> >> >>> It's possible to do this as regular user as well, but this was not
> >> >>> documented. I've done so now, at
> >> >>> https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Grid#Stuck_jobs
> .
> >> >>>
> >> >>> Best,
> >> >>> Merlijn
> >> >>>
> >> >>> On 18 August 2016 at 09:18, Anthony Di Franco <di.franco at gmail.com>
> >> >>> wrote:
> >> >>>>
> >> >>>> Hi all,
> >> >>>>  I'm back working on recitation-bot and I've hit a bit of a snag,
> not
> >> >>>> having noticed before starting the web service that I'd need to
> >> >>>> change the
> >> >>>> default configuration of uwsgi regarding threads to work with what
> >> >>>> I've
> >> >>>> written. Now my job is stuck:
> >> >>>>
> >> >>>> (new-env)tools.recitation-bot at tools-bastion-03:~$ qdel -f 9915064
> >> >>>> tools.recitation-bot has registered the job 9915064 for deletion
> >> >>>> ............
> >> >>>> (new-env)tools.recitation-bot at tools-bastion-03:~$ qstat
> >> >>>> job-ID  prior   name       user         state submit/start at
> >> >>>> queue
> >> >>>> slots ja-task-ID
> >> >>>>
> >> >>>>
> >> >>>>
> -----------------------------------------------------------------------------------------------------------------
> >> >>>> 9915064 0.30005 uwsgi-plai tools.recita dr    08/18/2016 06:23:42
> >> >>>> webgrid-generic at tools-webgrid-     1
> >> >>>> (new-env)tools.recitation-bot at tools-bastion-03:~$ webservice
> status
> >> >>>> Your webservice is not running
> >> >>>> (new-env)tools.recitation-bot at tools-bastion-03:~$ webservice stop
> >> >>>> Your webservice is not running
> >> >>>> (new-env)tools.recitation-bot at tools-bastion-03:~$ webservice
> >> >>>> uwsgi-plain
> >> >>>> start
> >> >>>> Your job is already running
> >> >>>>
> >> >>>> I'd be most grateful if someone with the power could help me clear
> it
> >> >>>> out. I've got the configuration fixed for the next uwsgi startup
> >> >>>> already.
> >> >>>>
> >> >>>> Anthony
> >> >>>>
> >> >>>> _______________________________________________
> >> >>>> Labs-l mailing list
> >> >>>> Labs-l at lists.wikimedia.org
> >> >>>> https://lists.wikimedia.org/mailman/listinfo/labs-l
> >> >>>>
> >> >>>
> >> >>> _______________________________________________
> >> >>> Labs-l mailing list
> >> >>> Labs-l at lists.wikimedia.org
> >> >>> https://lists.wikimedia.org/mailman/listinfo/labs-l
> >> >>
> >> >>
> >> >> _______________________________________________
> >> >> Labs-l mailing list
> >> >> Labs-l at lists.wikimedia.org
> >> >> https://lists.wikimedia.org/mailman/listinfo/labs-l
> >> >>
> >> >
> >> >
> >> > _______________________________________________
> >> > Labs-l mailing list
> >> > Labs-l at lists.wikimedia.org
> >> > https://lists.wikimedia.org/mailman/listinfo/labs-l
> >> >
> >>
> >>
> >>
> >> --
> >> Yuvi Panda T
> >> http://yuvi.in/blog
> >>
> >> _______________________________________________
> >> Labs-l mailing list
> >> Labs-l at lists.wikimedia.org
> >> https://lists.wikimedia.org/mailman/listinfo/labs-l
>
>
>
> --
> Yuvi Panda T
> http://yuvi.in/blog
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.wikimedia.org/pipermail/labs-l/attachments/20160819/953b193b/attachment.html>


More information about the Labs-l mailing list