From: vedm
Subject: question about CMUCL processes
Date: 
Message-ID: <861x8pgiaz.fsf@localhost.localdomain>
I have a timer process in cmucl. At first when I created it
mp:*all-processes* showed only two processes: the initial process and the
timer.

Now, a couple of days later, besides these two processes,
mp:*all-processes* shows a lot of other processes that look like this:

 #<Process Timeout monitor for #<Process my-timer {595956B5}> {598BDC75}>
 #<Process Timeout monitor for #<Process my-timer {595956B5}> {598BCAED}>
 #<Process Timeout monitor for #<Process my-timer {595956B5}> {59748E7D}>
 ....

where "my-timer" is the name of my timer process (it is simply an endless
loop sleeping most of the time and performing a http call every hour).

What are those "timeout monitor" processes and why their number keeps
growing? I tried to find documentation about it but did not succeed.

-- 
vedm

From: nabla
Subject: Re: question about CMUCL processes
Date: 
Message-ID: <ZnHde.4369$_9.3570@news.chello.at>
vedm wrote:

> where "my-timer" is the name of my timer process (it is simply an endless
> loop sleeping most of the time and performing a http call every hour).

What are you using to performs these HTTP calls?

> 
> What are those "timeout monitor" processes and why their number keeps
> growing? 

Are you using with-timeout from CLOCC 
http://clocc.sourceforge.net/dist/port.html)?


-- 
Pozdrawiam,
Rafał Strzaliński (nabla)
From: vedm
Subject: Re: question about CMUCL processes
Date: 
Message-ID: <86r7gng7ld.fsf@localhost.localdomain>
nabla <···············@nospam.gmail.com> writes:

> vedm wrote:
> 
> > where "my-timer" is the name of my timer process (it is simply an endless
> > loop sleeping most of the time and performing a http call every hour).
> 
> What are you using to performs these HTTP calls?

I use the url package of CLLIB which is part of CLOCC:
http://clocc.sourceforge.net/dist/cllib.html
 
> > What are those "timeout monitor" processes and why their number keeps
> > growing?
> 
> Are you using with-timeout from CLOCC
> http://clocc.sourceforge.net/dist/port.html)?

The timer looks exactly like you suggested it:

(defun make-timer (func period  &optional func-args &key (name "a-timer"))
  (mp:make-process #'(lambda ()
 		       (loop
                        (if (null func-args)
                            (funcall func)
                            (funcall func func-args))
                        (sleep period))) :name name))

and I call it like this:

(make-timer 'get-data (* 60 60)
            :name "my-timer ")

The get-data function pulls an html page from the Internet using
cllib:with-open-url, parses the html with Franz's html parser
(http://opensource.franz.com/xmlutils), extracts some data form the html
and saves it in a postgresql database using the CLSQL package.

So may be some of these packages use with-timeout, I do not know. 

And my timeout processes are already 130...


-- 
vedm
From: nabla
Subject: Re: question about CMUCL processes
Date: 
Message-ID: <rp8ee.7642$_9.453@news.chello.at>
vedm wrote:
> nabla <···············@nospam.gmail.com> writes:
> 
> The get-data function pulls an html page from the Internet using
> cllib:with-open-url, parses the html with Franz's html parser
> (http://opensource.franz.com/xmlutils), extracts some data form the html
> and saves it in a postgresql database using the CLSQL package.
> 
> So may be some of these packages use with-timeout, I do not know.

Sorry I cant help. Maybe your function is unable to establish connection 
and waits until timeout? Try decrease timeouts.


-- 
Best regards,
Rafał Strzaliński (nabla)
From: vedm
Subject: Re: question about CMUCL processes
Date: 
Message-ID: <86is1yfuto.fsf@localhost.localdomain>
nabla <···············@nospam.gmail.com> writes:

> Sorry I cant help. Maybe your function is unable to establish connection
> and waits until timeout? Try decrease timeouts.

Actually the whole thing works quite well: I get the data in my
database, and the only strange thing is those "timeout monitor"
processes. But today I see that their number does not increase any more,
so I do not think that this is a big problem.


-- 
vedm