NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rss2email - keeps cron instances open on timeout - solved



On Thu, Apr 11, 2013 at 06:30:18PM +0200, herbert langhans wrote:
> Niels, Matthew,
> I am still wrenching on this. 
> These timeout errors occur to rarely to provoke it by running rss2email.
> I have restarted the server and wait for the 'timeout' what is caused by
> this rss2email. Then I try to trace it back by the timestamp of the cron
> log file. 
> 
> They are not Python processes, these what I found relate to mailman (top
> shows the user 'mailman'). Python is not the culprit.
> 
> There are these 'cron' as well as 'sh' processes open after the timeout.
> I think so and will wait and count these processes. I do not understand
> it fully myself, Niels. 
> 
> One question though. This is /var/log/cron:
> <snip>
> Apr 11 18:15:00 manul cron[1124]: (herbs) CMD START (/usr/pkg/bin/r2e run)
> </snip>
> 
> The number in the square bracket[1124] is the PID of the cron instance,
> yes? Or the /bin/sh it opens? Just to be sure.
> 
> I let you know after some further observation.
> Thanks!
> herb langhans
> 
> 
> On Thu, Apr 11, 2013 at 02:04:37PM +0200, Niels Dettenbach wrote:
> > Am Donnerstag, 11. April 2013, 13:20:58 schrieben Sie:
> > > Is there some easy way to make cron and sh show the pid it just has
> > > opened? So that I can invoke rss2email and know for sure on what
> > > occasion it keeps the process? With top I just get a list of some more
> > > 'crons' opened ...
> > hmm,
> > not shure if i understand you fully here (do you mean the PID of the 
> > rss2email 
> > procs?) - you might write a short wrapper shell script in between which 
> > starts 
> > rss2email and writes out the PIDs i.e. into a file.
> > 
> > rss2email &
> > R2E_PID=$!
> > 
> > echo $R2E_PID >> /some/file/with/rss2email.pids
> > 
> > 
> > Why not trying to get the rss2email error from the shell directly (i know 
> > that 
> > it may take some time / many starts to un into that error in practice...)? 
> > Then you can see what / where it is hanging there...
> > 
> > 
> > hth a little
> > best regards,
> > 
> > 
> > Niels.

Thanks for your input - I have been totally wrong with rss2email. 

It was another cron job what left the processes open. Some lftp script I
use with cron fooled me - lftp has no timeout by default. If some ftp
server doesnt respond then lftp tries forever and leaves for each
invocation one cron and one sh process open.

If you ever use lftp with cron dont forget to configure lftp.conf with
limited retry and timeout settings!!

Thanks!
herb langhans
 


Home | Main Index | Thread Index | Old Index