Re: [NTG-context] calling ConTeXt as a background process (SOLVED)
On 26-10-2010 10:56, Taco Hoekwater wrote: On 10/26/10 22:09, Hans Hagen wrote: On 26-10-2010 9:28, Taco Hoekwater wrote: Hi Henning, On 10/08/10 21:44, Henning Hraban Ramm wrote: Ok, the failures were the same with fcgi and gunicorn app servers. But it _works_ with django's dev server (which you must not use in production due to memory/security holes etc.). We just had a somewhat similar problem (texlua hung at 100% cpu when run via apache) and it turns out, after lots of debugging, that mtxrun cannot do anything without $HOME. Perhaps yours was a different symptom of the same problem ? try this if you want to test CPU heat generation: $ env HOME= context knuth so what should HOME default to then? "."? Not a default is what is needed, what is needed is that it should work without a HOME at all (server processes typically dont have one). sure, but I guess that some path specs have ~ and that we get a loop in the resolver due to this and for these patsh with ~ we need a proper default then Let's sort this out offlist. okay Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] calling ConTeXt as a background process (SOLVED)
On 10/26/10 22:09, Hans Hagen wrote: > On 26-10-2010 9:28, Taco Hoekwater wrote: >> >> Hi Henning, >> >> On 10/08/10 21:44, Henning Hraban Ramm wrote: >>> Ok, the failures were the same with fcgi and gunicorn app servers. >>> >>> But it _works_ with django's dev server (which you must not use in >>> production due to memory/security holes etc.). >> >> We just had a somewhat similar problem (texlua hung at 100% cpu >> when run via apache) and it turns out, after lots of debugging, >> that mtxrun cannot do anything without $HOME. Perhaps yours was >> a different symptom of the same problem ? >> >> try this if you want to test CPU heat generation: >> >>$ env HOME= context knuth > > so what should HOME default to then? "."? Not a default is what is needed, what is needed is that it should work without a HOME at all (server processes typically dont have one). Let's sort this out offlist. Best wishes, Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] calling ConTeXt as a background process (SOLVED)
Am 2010-10-26 um 21:28 schrieb Taco Hoekwater: We just had a somewhat similar problem (texlua hung at 100% cpu when run via apache) and it turns out, after lots of debugging, that mtxrun cannot do anything without $HOME. Perhaps yours was a different symptom of the same problem ? Ah, I didn't check HOME; I'll add that to my environment, just in case. (But ATM it runs well.) try this if you want to test CPU heat generation: $ env HOME= context knuth (use one process for each available cpu thread, of course) ;-) I'm using a rented virtual server and won't feel the heat. (And I guess the hoster will just throttle or disable it if I try to melt it.) Thank you! Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] calling ConTeXt as a background process (SOLVED)
On 26-10-2010 9:28, Taco Hoekwater wrote: Hi Henning, On 10/08/10 21:44, Henning Hraban Ramm wrote: Ok, the failures were the same with fcgi and gunicorn app servers. But it _works_ with django's dev server (which you must not use in production due to memory/security holes etc.). We just had a somewhat similar problem (texlua hung at 100% cpu when run via apache) and it turns out, after lots of debugging, that mtxrun cannot do anything without $HOME. Perhaps yours was a different symptom of the same problem ? try this if you want to test CPU heat generation: $ env HOME= context knuth so what should HOME default to then? "."? - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] calling ConTeXt as a background process (SOLVED)
Hi Henning, On 10/08/10 21:44, Henning Hraban Ramm wrote: > Ok, the failures were the same with fcgi and gunicorn app servers. > > But it _works_ with django's dev server (which you must not use in > production due to memory/security holes etc.). We just had a somewhat similar problem (texlua hung at 100% cpu when run via apache) and it turns out, after lots of debugging, that mtxrun cannot do anything without $HOME. Perhaps yours was a different symptom of the same problem ? try this if you want to test CPU heat generation: $ env HOME= context knuth (use one process for each available cpu thread, of course) Best wishes, Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] calling ConTeXt as a background process (SOLVED)
Am 2010-10-10 um 10:47 schrieb Patrick Gundlach: Thank you all for your patience, ideas and help! Sorry, that I didn't quite understand the problem/solution, could you describe in a few sentences what problem was and how you solved it? I actually couldn't find out what the real problem was. ;-) I tried to start ConTeXt from a Django web application server. (Running ConTeXt from an active shell was no problem.) My Django FCGI processes were running under daemontools (http://cr.yp.to/daemontools.html ) supervision, i.e. started by its supervise daemon. In this setup, texlua hung at least at uname (and maybe other) calls. I found no error messages on that, I guess the environment was restricted in some way. Since I thought it might have to do with the FCGI server, I replaced that by Green Unicorn (http://gunicorn.org/), but that made no difference WRT ConTeXt. When I changed process supervision from daemontools to supervisor (http://supervisord.org/ ), I got no further problems. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] calling ConTeXt as a background process (SOLVED)
> > Thank you all for your patience, ideas and help! Sorry, that I didn't quite understand the problem/solution, could you describe in a few sentences what problem was and how you solved it? Thanks Patrick ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] calling ConTeXt as a background process (SOLVED)
Ok, the failures were the same with fcgi and gunicorn app servers. But it _works_ with django's dev server (which you must not use in production due to memory/security holes etc.). While ConTeXt runs it looks like: 5852 25767 TS 21 18:04 pts/000:00:00 \_ python manage.py runserver 8000 1477 5852 TS 23 18:07 pts/000:00:03 \_ /var/www/ cerebrale/bin/python manage.py runserver 8000 3395 1477 TS 22 18:08 pts/000:00:00 \_ /bin/sh -c date "+%Y-%m-%d %H:%M:%S" && cd /var/www/.../_textemp && /var/opt/ context/tex/texmf-linux-64/bin/context --purgeall --batchmode -- result="/var/www/... 3397 3395 TS 22 18:08 pts/000:00:00 \_ /bin/ sh /var/opt/context/tex/texmf-linux-64/bin/context --purgeall -- batchmode --result=/var/www/... 3398 3397 TS 15 18:08 pts/000:00:00 \_ texlua /var/opt/context/tex/texmf-linux-64/bin/mtxrun --script context --purgeall --batchmode --result=/var/www/... 3400 3398 TS 21 18:08 pts/000:00:00 \_ luatex --interaction=batchmode --fmt=/var/opt/context/tex/texmf- cache/.../cont-en --lua=/var/opt/context/tex... TeX completes fast, and everything seems well afterwards. But I started that app server from an active shell. Maybe that's the difference? Right, if I start gunicorn manually, it also works. So, the culprit seems to be the automatic background start of the app server via daemontools. I'll have to test other means of starting and supervising the processes - e.g. runit or supervisor. Since I like Python and don't want to replace "init" yet, I try the latter first. Some hours later: YES IT WORKS with supervisor so far! Thank you all for your patience, ideas and help! Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___