From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p5BEBgeC007031 for ; Sat, 11 Jun 2011 16:11:42 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApUCADh2803RVaE2kGdsb2JhbAA8AQMSpkYIFAEBAQEJCQ0HFAQhqQeCS4w3gkOEDjmIZQEBAwaGHgSHB4othE+BG4V1PINH X-IronPort-AV: E=Sophos;i="4.65,352,1304287200"; d="scan'208";a="101116885" Received: from mail-fx0-f54.google.com ([209.85.161.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 11 Jun 2011 16:11:37 +0200 Received: by fxm11 with SMTP id 11so4284356fxm.27 for ; Sat, 11 Jun 2011 07:11:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:content-type:content-transfer-encoding :subject:date:message-id:to:mime-version:x-mailer; bh=45sxi71N4PMLgCl5JuKnDC+S/0NBJ6T1/k3raosgc38=; b=DLIt6I648p9DUousZrZa2ZpT3ScB8G7cKHm4PUY1n7c2zmYg6Uu5rK/h7Kfhmxpy0s qHntkVCC8wnci8E1CgWnmWJvnPB+FNfTdjNBcMXOL+V5fyV2lI7Ni820yzulwGGAYEyE uA51xZ2LsWgb10RAxjCrQBy7su4+w0r7WiIGs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=AC2zndehjyWUkyu1hB5lQoMQpHS70H+9J6lpaDldrF1leWke3yJXgcexKOmKdFTiSO J0FSX6957L8i2UK8xsrSac5mB1zs0QmF0r20YwvTXRnT3W3QyWYQocgGLgO0lKEfLvnz agQ2FjwpyZTXBCsdmPjxL3jMN3DAFIC3OSn90= Received: by 10.223.51.4 with SMTP id b4mr1353448fag.93.1307801495103; Sat, 11 Jun 2011 07:11:35 -0700 (PDT) Received: from [192.168.1.103] ([46.159.145.24]) by mx.google.com with ESMTPS id e15sm1411068faa.23.2011.06.11.07.11.33 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 11 Jun 2011 07:11:34 -0700 (PDT) From: Joel Reymont Content-Type: text/plain; charset=us-ascii Date: Sat, 11 Jun 2011 18:11:29 +0400 Message-Id: <12E34CD6-9D7D-4BA3-9576-57DC25AB94FC@gmail.com> To: caml-list Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p5BEBgeC007031 Subject: [Caml-list] ocamlnet, netclient and closing connection after every http client request I'm using netclient from ocamlnet 3.2.1 to issue thousands of http requests. This leaves me with thousands of sockets hanging around open, until I run out of sockets. Is there a way to tell netclient that I want a single connection open to my server at any given time, no more? I tried copying Http_client.Convenience to add the following settings but this didn't solve my problem. let http_realistic = serialize (fun () -> let p = Lazy.force pipe in let opt = p # get_options in p # set_options { opt with synchronization = Sync; connection_timeout = 30.0; (* seconds *) number_of_parallel_connections = 1; inhibit_persistency = true; }; ) What am I doing wrong? Thanks, Joel -------------------------------------------------------------------------- - for hire: mac osx device driver ninja, kernel extensions and usb drivers ---------------------+------------+--------------------------------------- http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont ---------------------+------------+---------------------------------------