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. Advertising

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:
    749
    Eric Sosman
    Jul 8, 2003
  2. Jean-Paul Calderone
    Replies:
    0
    Views:
    480
    Jean-Paul Calderone
    Mar 20, 2009
  3. Floris Bruynooghe
    Replies:
    1
    Views:
    473
    Floris Bruynooghe
    Mar 24, 2009
  4. Jason DiCioccio
    Replies:
    17
    Views:
    190
    Robert Klemme
    Nov 18, 2003
  5. Daemon Win32::Daemon;

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

Share This Page