nethttp memory leak on long-running daemon

Discussion in 'Ruby' started by sjoonk, Feb 10, 2007.

  1. sjoonk

    sjoonk Guest

    I used nethttp library to my small program. My program is simple.
    It loops and call nethttp get method at every loop.
    But when this program run for a long time, memory was up and up
    eventually.
    Here's my program. What's the matter??

    require 'net/http'
    loop do
    begin
    url = "http://localhost/test.html"
    resp = Net::HTTP.get(URI.parse(url))
    rescue
    # do nothing
    end
    sleep rand(0.1) # just a wait
    end

    --
    Posted via http://www.ruby-forum.com/.
     
    sjoonk, Feb 10, 2007
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Marsaglia

    Assigning unsigned long to unsigned long long

    George Marsaglia, Jul 8, 2003, in forum: C Programming
    Replies:
    1
    Views:
    971
    Eric Sosman
    Jul 8, 2003
  2. Daniel Rudy

    unsigned long long int to long double

    Daniel Rudy, Sep 19, 2005, in forum: C Programming
    Replies:
    5
    Views:
    1,577
    Peter Shaggy Haywood
    Sep 20, 2005
  3. Mathieu Dutour

    long long and long

    Mathieu Dutour, Jul 17, 2007, in forum: C Programming
    Replies:
    4
    Views:
    697
    santosh
    Jul 24, 2007
  4. Bart C

    Use of Long and Long Long

    Bart C, Jan 9, 2008, in forum: C Programming
    Replies:
    27
    Views:
    1,242
    Peter Nilsson
    Jan 15, 2008
  5. veryhotsausage
    Replies:
    1
    Views:
    2,353
    veryhotsausage
    Jul 4, 2008
  6. Floris Bruynooghe
    Replies:
    1
    Views:
    617
    Floris Bruynooghe
    Mar 24, 2009
  7. Jason DiCioccio
    Replies:
    17
    Views:
    274
    Robert Klemme
    Nov 18, 2003
  8. Daemon Win32::Daemon;

    , Sep 7, 2006, in forum: Perl Misc
    Replies:
    0
    Views:
    426
Loading...