From: Henning Hraban Ramm <hraban@fiee.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: calling ConTeXt as a background process
Date: Thu, 7 Oct 2010 09:34:06 +0200 [thread overview]
Message-ID: <EECEBAE7-1617-4A50-B891-9D8BE3D76407@fiee.net> (raw)
In-Reply-To: <EC6A1A32-5367-4818-8B38-6B4F0A25B7D1@fiee.net>
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)
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2010-10-07 7:34 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-07 7:06 Henning Hraban Ramm
2010-10-07 7:34 ` Henning Hraban Ramm [this message]
2010-10-07 8:42 ` Taco Hoekwater
2010-10-07 9:00 ` Henning Hraban Ramm
2010-10-07 9:06 ` Taco Hoekwater
2010-10-07 10:19 ` Henning Hraban Ramm
[not found] ` <90F33E64-7BB9-4DEB-9E89-A4FC99169401@awi.de>
2010-10-07 15:55 ` Henning Hraban Ramm
2010-10-07 16:32 ` Florian Wobbe
2010-10-08 7:36 ` Henning Hraban Ramm
2010-10-08 7:59 ` Florian Wobbe
2010-10-08 8:43 ` Henning Hraban Ramm
2010-10-08 9:25 ` Florian Wobbe
2010-10-08 10:00 ` Henning Hraban Ramm
2010-10-08 11:46 ` Florian Wobbe
2010-10-08 13:47 ` Henning Hraban Ramm
2010-10-08 13:54 ` luigi scarso
2010-10-08 13:54 ` Taco Hoekwater
2010-10-08 14:22 ` Patrick Gundlach
2010-10-08 14:30 ` Henning Hraban Ramm
2010-10-08 14:57 ` Taco Hoekwater
2010-10-08 15:10 ` Hans Hagen
2010-10-08 15:08 ` Florian Wobbe
2010-10-08 19:44 ` calling ConTeXt as a background process (SOLVED) Henning Hraban Ramm
2010-10-10 8:47 ` Patrick Gundlach
2010-10-10 9:01 ` Henning Hraban Ramm
2010-10-26 19:28 ` Taco Hoekwater
2010-10-26 20:09 ` Hans Hagen
2010-10-26 20:56 ` Taco Hoekwater
2010-10-26 21:32 ` Hans Hagen
2010-10-26 20:13 ` Henning Hraban Ramm
2010-10-08 15:05 ` calling ConTeXt as a background process Henning Hraban Ramm
2010-10-07 18:16 ` taco
2010-10-08 8:00 ` Henning Hraban Ramm
2010-10-08 8:12 ` Patrick Gundlach
2010-10-08 9:21 ` Henning Hraban Ramm
2010-10-08 9:27 ` luigi scarso
2010-10-08 8:37 ` luigi scarso
2010-10-08 8:47 ` Henning Hraban Ramm
2010-10-08 8:54 ` luigi scarso
2010-10-08 10:19 ` Hans Hagen
2010-10-07 10:16 ` Robin.Kirkham
2010-10-07 11:02 ` Henning Hraban Ramm
2010-10-07 10:27 ` Patrick Gundlach
2010-10-07 15:44 ` Henning Hraban Ramm
2010-10-07 15:48 ` luigi scarso
2010-10-07 16:15 ` Henning Hraban Ramm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=EECEBAE7-1617-4A50-B891-9D8BE3D76407@fiee.net \
--to=hraban@fiee.net \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).