Menu

#52 Memory consumed by (cllib:open-url)

open
port (16)
7
2007-06-25
2007-06-25
No

CLLIB:OPEN-URL seems to be chewing up memory. Evaling either (close (cllib:open-url (cllib:url "http://yahoo.com"))) or (cllib:with-open-url (stream "http://yahoo.com") ())chews up ~ 200-400K.

I think the problem is that background processes aren't being cleaned up. Check (mp:list-all-processes) on Lispworks, sys:*all-processes* on Allegro - you'll find a number of sleeping "Timeout Monitor" processes waiting around unused.

I could not replicate the problem using (port:with-timeout (5) (princ "in process")). The timeout processes may have a stream open or something, and are failing to get cleaned up? So, I'm assigning this to CLLIB.

Discussion

  • Aneil Mallavarapu

    • priority: 5 --> 7
     
  • Aneil Mallavarapu

    Logged In: YES
    user_id=870521
    Originator: YES

    These comments refer to Allegro8, Lispworks 5.0.1 and Lispworks 4.4.6 on Windows XP.

     
  • Sam Steingold

    Sam Steingold - 2007-06-25

    Logged In: YES
    user_id=5735
    Originator: NO

    for how long do these "Timeout Monitor" processes persist?
    they should be gone in 10 minutes.

     
  • Sam Steingold

    Sam Steingold - 2007-06-25
    • labels: 101108 --> port
     
  • Aneil Mallavarapu

    Logged In: YES
    user_id=870521
    Originator: YES

    > for how long do these "Timeout Monitor" processes persist?
    > they should be gone in 10 minutes.

    Ten minutes seems like a rather long while to have processes hanging out - one could do quite a few http requests in that interval.

    The processes are still present after at least 8 hours. I tried GC -(mark-and-sweep) on Lispworks - to no avail. I notice there's not a matching kill-process call in PORT:WITH-TIMEOUT is that intentional?

     
  • Sam Steingold

    Sam Steingold - 2008-06-22

    Logged In: YES
    user_id=5735
    Originator: NO

    there is no kill-process in WITH-TIMEOUT because the timer process should terminate as soon as the lambda finishes.

     

Log in to post a comment.