Re: CURL and Connection limits
Re: CURL and Connection limits
- Subject: Re: CURL and Connection limits
- From: "Jofell Gallardo" <email@hidden>
- Date: Wed, 19 Sep 2007 13:21:41 +0800
On 9/19/07, stephen joseph butler <email@hidden> wrote:
>
>
> 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.
Thanks Stephen. Am testing this now. One question. Does AppleScript
somehow could leak file handles?
_______________________________________________
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