From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72872 Path: news.gmane.org!not-for-mail From: Brendan Jurd Newsgroups: gmane.comp.tex.context Subject: Re: [SOLVED] mod_php vs context: tight loop Date: Fri, 02 Dec 2011 12:59:32 +1100 Message-ID: <4ED83104.2030404@achievecorp.com.au> References: <4ECF23B3.4030005@achievecorp.com.au> <4ECF4F04.7040304@wxs.nl> <4ED1CE7C.3080001@achievecorp.com.au> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1322791176 13325 80.91.229.12 (2 Dec 2011 01:59:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 2 Dec 2011 01:59:36 +0000 (UTC) Cc: mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Fri Dec 02 02:59:32 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RWIPT-0006Ub-Qb for gctc-ntg-context-518@m.gmane.org; Fri, 02 Dec 2011 02:59:31 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 211A6CB11E; Fri, 2 Dec 2011 02:59:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 6KWj02fnqPlC; Fri, 2 Dec 2011 02:59:27 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 98D54CB116; Fri, 2 Dec 2011 02:59:27 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7E1B2CB116 for ; Fri, 2 Dec 2011 02:59:26 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ychj9Xl2fO86 for ; Fri, 2 Dec 2011 02:59:09 +0100 (CET) Original-Received: from filter1-nij.mf.surf.net (filter1-nij.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id BB4DFCB111 for ; Fri, 2 Dec 2011 02:59:08 +0100 (CET) Original-Received: from mail.achievecorp.com.au (mail.achievecorp.com.au [122.49.201.131]) by filter1-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pB21x1NX000653 for ; Fri, 2 Dec 2011 02:59:06 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by mail.achievecorp.com.au (Postfix) with ESMTP id 279E242CC9AC; Fri, 2 Dec 2011 12:58:58 +1100 (EST) Original-Received: from mail.achievecorp.com.au ([127.0.0.1]) by localhost (bigbrother.achievecorp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v1KWdScVFQQy; Fri, 2 Dec 2011 12:58:57 +1100 (EST) Original-Received: from hermes.achievecorp (unknown [10.16.0.18]) by mail.achievecorp.com.au (Postfix) with ESMTP id C273A430FE2A; Fri, 2 Dec 2011 12:58:54 +1100 (EST) Original-Received: from [10.16.0.181] (unknown [10.16.0.181]) by hermes.achievecorp (Postfix) with ESMTP id C668CE65E5F; Fri, 2 Dec 2011 12:58:54 +1100 (EST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20111101 Thunderbird/7.0.1 In-Reply-To: <4ED1CE7C.3080001@achievecorp.com.au> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=122.49.201.131; country=AU; region=01; city=Canberra; latitude=-35.2833; longitude=149.2167; http://maps.google.com/maps?q=-35.2833,149.2167&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07G41X2zS - fdc43dced787 - 20111202 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.152 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:72872 Archived-At: On 27/11/11 16:45, Brendan Jurd wrote: > On 25/11/11 19:17, Hans Hagen wrote: >> On 25-11-2011 06:12, Brendan Jurd wrote: >>> I have a PHP application which generates documentation on the fly with >>> context. This has been working really well, but I am now testing >>> deployment on a new server with a more recent version of context, and it >>> seems to be somehow getting itself into a tight loop. >>> >> in such cases I always run with --batch to make sure that the job >> itself cannot block > > Thanks for the response. I tried running with --batch and it made no > difference to the outcome. The mtxrun process still got jammed up in > exactly the same manner. > > Regressing to the ubuntu 'lucid' packages resolved the problem for me, > so whatever is wrong has gone wrong somewhere in the combination of > packages in ubuntu 'natty'. > I did eventually get to the bottom of this. Turns out that mtxrun was failing to find a writable cache path (from mtxrun line 9269). To find a cache path, mtxrun searches through the environment variables TEXMFCACHE, TMPDIR, TEMPDIR, TMP, TEMP, HOME, HOMEPATH. The apache worker process had no such environment variables, so mtxrun failed. Once I added the following line to my PHP script, everything started working just fine: putenv('TEMPDIR=/tmp'); -- Regards, Brendan Jurd Software Engineer Achieve, Corp brendan.jurd@achievecorp.com.au ___________________________________________________________________________________ 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 ___________________________________________________________________________________