• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CURL and Connection limits
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CURL and Connection limits


  • Subject: Re: CURL and Connection limits
  • From: "stephen joseph butler" <email@hidden>
  • Date: Wed, 19 Sep 2007 00:13:25 -0500

On 9/17/07, Jofell Gallardo <email@hidden> wrote:
> Surely, I checked if I closed my file handles and curl connections, which
> led me to get away from any
> NSURLRequest instantiation and use libcurl for me to force the closing of a
> connection. Unfortunately, the
> problem still persists.

One other thing you could try is increasing the limit for your
process. For example, before doing your CURL work execute something
like this:

#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>

int main( int argc, char **argv )
{
  struct rlimit rl = {0};
  int result = 0;

  result = getrlimit( RLIMIT_NOFILE, &rl );
  if (result != 0)
    printf( "getrlimit = %d\n", errno );
  else {
    printf( "rl.rlim_cur = %d\n", rl.rlim_cur );
    printf( "rl.rlim_max = %d\n", rl.rlim_max );

    rl.rlim_cur = 512;
    result = setrlimit( RLIMIT_NOFILE, &rl );
    if (result != 0)
      printf( "setrlimit = %d\n", errno );
    else
      printf( "setrlimit succeeded\n" );
  }

  return 0;
}

If the number of files you can handle suddenly increases to ~ 500 then
you know you're still leaking handles somewhere.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: CURL and Connection limits
      • From: "Jofell Gallardo" <email@hidden>
References: 
 >CURL and Connection limits (From: "Jofell Gallardo" <email@hidden>)

  • Prev by Date: Re: CURL and Connection limits
  • Next by Date: Re: nib not launching properly
  • Previous by thread: Re: CURL and Connection limits
  • Next by thread: Re: CURL and Connection limits
  • Index(es):
    • Date
    • Thread