Am 2010-10-07 um 09:06 schrieb Henning Hraban Ramm:
Hi together!
I'm trying since about a week to get ConTeXt running as a background process of a web application. It's always hanging, and I get no log.
"ps axef" shows the call stack:
\_ /var/www/xxx/bin/python /var/www/xxx/releases/current/cerebrale/ manage.py runfcgi method=threaded ... \_ /bin/sh -c cd /var/www/xxx/_textemp && /var/opt/context/tex/ texmf-linux-64/bin/context ... \_ /bin/sh /var/opt/context/tex/texmf-linux-64/bin/context -- purgeall --batchmode --result=/var/www/xxx/_textemp/xxx.pdf \_ texlua /var/opt/context/tex/texmf-linux-64/bin/mtxrun --script context --purgeall --batchmode --result=/ ... \_ [uname] <defunct>
I.e. it looks like texlua calls uname in a way that lets the process hang forever. If I call the same from an active shell everything runs fine. Also uname alone works in the shell command. Any ideas what I could/should check?
I don't think it could be the PATH, since ConTeXt's bin as well as all the system tools are in: PATH=/var/opt/context/tex/texmf-linux-64/bin:/var/www/cerebrale/bin:/ command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/ sbin:/usr/X11R6/bin TEXMFOS=/var/opt/context/tex/texmf-linux-64 TEXROOT=/var/opt/context/tex
The user that runs the server process (incl. sub-shell and ConTeXt) owns all the TeX files and the directory.
Maybe it's a Python problem, here's my call: subprocess.Popen(cmd.encode('utf-8'), shell=True, stderr=logfile, stdout=logfile)
But I can call several other commands in this way without problems. The whole thing (incl. ConTeXt) works on my Mac (OSX 10.5.8) at home. Everything I call before ConTeXt shows up in the logfile.
I tried to call mtxrun directly and replaced the calls to uname -m with their return value (x86_64). Now the texlua process itself hangs, even if not "defunct" it doesn't do anything: \_ /var/www/xxx/bin/python /var/www/xxx/releases/current/cerebrale/ manage.py runfcgi method=threaded ... \_ /bin/sh -c cd /var/www/xxx/_textemp && mtxrun --script context "prd_paket --batchmode --once" PATH=/var/opt/context/tex/texmf- linux-64/bin:/var/www/xxx/bin:... \_ texlua /var/opt/context/tex/texmf-linux-64/bin/mtxrun -- script context prd_paket --batchmode --once TEXMFOS=/var/opt/context/ tex/texmf-linux-64 VIRTUAL_ENV=/var/www/xxx PATH=/var/opt/context/tex/ texmf-linux-64/bin:... Help? Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)