Loading ...
Sorry, an error occurred while loading the content.

13888lwt or ocsigen problem I have no idea

Expand Messages
  • Komtanoo Pinpimai
    May 20, 2013
    • 0 Attachment
      Hi, I should ask this in the Lwt or Ocsigen mailing list but I'm not quite
      sure where they are or even they exist.

      I'm running an ocsigen server like a webservice that makes some http calls
      and returns result. Every now and then it would id with

      Fatal error: exception Unix.Unix_error(12, "select", "")

      (in OSX)

      In linux it throws the following message and stop accepting new connection:

      Max number of file descriptors reached unexpectedly, please check...


      I suspected that it's coming from the same cause so I wrote a small script


      open Lwt

      let rec run_x i =
      Ocsigen_http_client.get_url "http://apache.org/xx" >>= (fun _ ->
      Printf.printf "ok %d\n" i; flush_all(); run_x (i+1))

      let _ =
      Lwt_main.run ( run_x 0)


      In osx, it's able to fetch that URL up to 1014 times, and died with that
      It smells like that url fetch function does not close its file descriptors
      after fetching.

      Any idea ?


      [Non-text portions of this message have been removed]
    • Show all 3 messages in this topic