Welcome! Log In Create A New Profile

Advanced

a patch for "setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22) "

Posted by mikespook 
My friend xiaoxiaolu make a pacth for the
issue:"setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22) ".
And he said he is not good at English writing ( So do I. -_-! ). So, I
post this patch here, thanks for his good job.

--- php-5.2.13-fpm-0.5.13.diff 2010-05-07 10:13:14.450172083 +0800
+++ php-5.2.13-fpm-0.5.13.diff.new 2010-05-07 10:08:49.700180313 +0800
@@ -32944,7 +32944,7 @@
+ getrlimit(RLIMIT_NOFILE, &r);
+
+ r.rlim_cur = (rlim_t) wp->config->rlimit_files;
-+
++ r.rlim_max = r.rlim_cur;
+ if (0 > setrlimit(RLIMIT_NOFILE, &r)) {
+ zlog(ZLOG_STUFF, ZLOG_SYSERROR, "setrlimit(RLIMIT_NOFILE)
failed");
+ }
@@ -32956,7 +32956,7 @@
+ getrlimit(RLIMIT_CORE, &r);
+
+ r.rlim_cur = wp->config->rlimit_core == -1 ? (rlim_t)
RLIM_INFINITY : (rlim_t) wp->config->rlimit_core;
-+
++ r.rlim_max = r.rlim_cur;
+ if (0 > setrlimit(RLIMIT_CORE, &r)) {
+ zlog(ZLOG_STUFF, ZLOG_SYSERROR, "setrlimit(RLIMIT_CORE) failed");
+ }


The patch could be patched by:

tar jxvf php-5.2.13.tar.bz2
gzip -d php-5.2.13-fpm-0.5.13.diff.gz
patch -p0 < php-5.2.13-fpm-0.5.13.diff.diff

Dose some one review this patch and check it into the sources?

Thx!
Re: a patch for "setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22) "
May 13, 2010 02:14AM
Since 5.2.x is all one big patch anyway you could make the
modification on that and send it to me. I can examine it and post it
to the site. I'll try to merge it myself quick when I get home also.

On May 12, 2010, at 9:04 PM, mikespook <mikespook@gmail.com> wrote:

> My friend xiaoxiaolu make a pacth for the
> issue:"setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22) ".
> And he said he is not good at English writing ( So do I. -_-! ). So, I
> post this patch here, thanks for his good job.
>
> --- php-5.2.13-fpm-0.5.13.diff 2010-05-07 10:13:14.450172083 +0800
> +++ php-5.2.13-fpm-0.5.13.diff.new 2010-05-07 10:08:49.700180313
> +0800
> @@ -32944,7 +32944,7 @@
> + getrlimit(RLIMIT_NOFILE, &r);
> +
> + r.rlim_cur = (rlim_t) wp->config->rlimit_files;
> -+
> ++ r.rlim_max = r.rlim_cur;
> + if (0 > setrlimit(RLIMIT_NOFILE, &r)) {
> + zlog(ZLOG_STUFF, ZLOG_SYSERROR, "setrlimit(RLIMIT_NOFILE)
> failed");
> + }
> @@ -32956,7 +32956,7 @@
> + getrlimit(RLIMIT_CORE, &r);
> +
> + r.rlim_cur = wp->config->rlimit_core == -1 ? (rlim_t)
> RLIM_INFINITY : (rlim_t) wp->config->rlimit_core;
> -+
> ++ r.rlim_max = r.rlim_cur;
> + if (0 > setrlimit(RLIMIT_CORE, &r)) {
> + zlog(ZLOG_STUFF, ZLOG_SYSERROR, "setrlimit(RLIMIT_CORE)
> failed");
> + }
>
>
> The patch could be patched by:
>
> tar jxvf php-5.2.13.tar.bz2
> gzip -d php-5.2.13-fpm-0.5.13.diff.gz
> patch -p0 < php-5.2.13-fpm-0.5.13.diff.diff
>
> Dose some one review this patch and check it into the sources?
>
> Thx!
I'm the guy named xiaoxiaolu, and this is a patch file:

http://www.ratazzi.org/upload/php-5.2.13-fpm-0.5.13.diff.diff


On May 13, 2:12 pm, Michael Shadle <mike...@gmail.com> wrote:
> Since 5.2.x is all one big patch anyway you could make the  
> modification on that and send it to me. I can examine it and post it  
> to the site. I'll try to merge it myself quick when I get home also.
>
> On May 12, 2010, at 9:04 PM, mikespook <mikesp...@gmail.com> wrote:
>
>
>
> > My friend xiaoxiaolu make a pacth for the
> > issue:"setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22) ".
> > And he said he is not good at English writing ( So do I. -_-! ). So, I
> > post this patch here, thanks for his good job.
>
> > --- php-5.2.13-fpm-0.5.13.diff    2010-05-07 10:13:14.450172083 +0800
> > +++ php-5.2.13-fpm-0.5.13.diff.new    2010-05-07 10:08:49.700180313  
> > +0800
> > @@ -32944,7 +32944,7 @@
> > +        getrlimit(RLIMIT_NOFILE, &r);
> > +
> > +        r.rlim_cur = (rlim_t) wp->config->rlimit_files;
> > -+
> > ++       r.rlim_max = r.rlim_cur;
> > +        if (0 > setrlimit(RLIMIT_NOFILE, &r)) {
> > +            zlog(ZLOG_STUFF, ZLOG_SYSERROR, "setrlimit(RLIMIT_NOFILE)
> > failed");
> > +        }
> > @@ -32956,7 +32956,7 @@
> > +        getrlimit(RLIMIT_CORE, &r);
> > +
> > +        r.rlim_cur = wp->config->rlimit_core == -1 ? (rlim_t)
> > RLIM_INFINITY : (rlim_t) wp->config->rlimit_core;
> > -+
> > ++       r.rlim_max = r.rlim_cur;
> > +        if (0 > setrlimit(RLIMIT_CORE, &r)) {
> > +            zlog(ZLOG_STUFF, ZLOG_SYSERROR, "setrlimit(RLIMIT_CORE)  
> > failed");
> > +        }
>
> > The patch could be patched by:
>
> > tar jxvf php-5.2.13.tar.bz2
> > gzip -d php-5.2.13-fpm-0.5.13.diff.gz
> > patch -p0 < php-5.2.13-fpm-0.5.13.diff.diff
>
> > Dose some one review this patch and check it into the sources?
>
> > Thx!
Re: a patch for "setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22) "
May 13, 2010 02:00PM
Thanks all.

http://php-fpm.org/downloads/php-5.2.13-fpm-0.5.14.diff.gz

Incremented the version number as well (0.5.13 -> 0.5.14)

On Thu, May 13, 2010 at 5:27 AM, Lucifer <locifer@gmail.com> wrote:
> I'm the guy named xiaoxiaolu, and this is a patch file:
>
> http://www.ratazzi.org/upload/php-5.2.13-fpm-0.5.13.diff.diff
>
>
> On May 13, 2:12 pm, Michael Shadle <mike...@gmail.com> wrote:
>> Since 5.2.x is all one big patch anyway you could make the
>> modification on that and send it to me. I can examine it and post it
>> to the site. I'll try to merge it myself quick when I get home also.
>>
>> On May 12, 2010, at 9:04 PM, mikespook <mikesp...@gmail.com> wrote:
>>
>>
>>
>> > My friend xiaoxiaolu make a pacth for the
>> > issue:"setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22) ".
>> > And he said he is not good at English writing ( So do I. -_-! ). So, I
>> > post this patch here, thanks for his good job.
>>
>> > --- php-5.2.13-fpm-0.5.13.diff    2010-05-07 10:13:14.450172083 +0800
>> > +++ php-5.2.13-fpm-0.5.13.diff.new    2010-05-07 10:08:49.700180313
>> > +0800
>> > @@ -32944,7 +32944,7 @@
>> > +        getrlimit(RLIMIT_NOFILE, &r);
>> > +
>> > +        r.rlim_cur = (rlim_t) wp->config->rlimit_files;
>> > -+
>> > ++       r.rlim_max = r.rlim_cur;
>> > +        if (0 > setrlimit(RLIMIT_NOFILE, &r)) {
>> > +            zlog(ZLOG_STUFF, ZLOG_SYSERROR, "setrlimit(RLIMIT_NOFILE)
>> > failed");
>> > +        }
>> > @@ -32956,7 +32956,7 @@
>> > +        getrlimit(RLIMIT_CORE, &r);
>> > +
>> > +        r.rlim_cur = wp->config->rlimit_core == -1 ? (rlim_t)
>> > RLIM_INFINITY : (rlim_t) wp->config->rlimit_core;
>> > -+
>> > ++       r.rlim_max = r.rlim_cur;
>> > +        if (0 > setrlimit(RLIMIT_CORE, &r)) {
>> > +            zlog(ZLOG_STUFF, ZLOG_SYSERROR, "setrlimit(RLIMIT_CORE)
>> > failed");
>> > +        }
>>
>> > The patch could be patched by:
>>
>> > tar jxvf php-5.2.13.tar.bz2
>> > gzip -d php-5.2.13-fpm-0.5.13.diff.gz
>> > patch -p0 < php-5.2.13-fpm-0.5.13.diff.diff
>>
>> > Dose some one review this patch and check it into the sources?
>>
>> > Thx!
>
Hi, would you like to add RLIMIT_NPROC and RLIMIT_CPU?
I run php-fpm on OpenBSD and try to set those limit to /etc/login.conf,
but php-fpm ignore it (login.conf settings)
thanks.

mike503於 2010年5月14日星期五UTC+8上午1時58分34秒寫道:
>
> Thanks all.
>
> http://php-fpm.org/downloads/php-5.2.13-fpm-0.5.14.diff.gz
>
> Incremented the version number as well (0.5.13 -> 0.5.14)
>
> On Thu, May 13, 2010 at 5:27 AM, Lucifer <loc...@gmail.com <javascript:>>
> wrote:
> > I'm the guy named xiaoxiaolu, and this is a patch file:
> >
> > http://www.ratazzi.org/upload/php-5.2.13-fpm-0.5.13.diff.diff
> >
> >
> > On May 13, 2:12 pm, Michael Shadle <mike...@gmail.com> wrote:
> >> Since 5.2.x is all one big patch anyway you could make the
> >> modification on that and send it to me. I can examine it and post it
> >> to the site. I'll try to merge it myself quick when I get home also.
> >>
> >> On May 12, 2010, at 9:04 PM, mikespook <mikesp...@gmail.com> wrote:
> >>
> >>
> >>
> >> > My friend xiaoxiaolu make a pacth for the
> >> > issue:"setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22) ".
> >> > And he said he is not good at English writing ( So do I. -_-! ). So,
> I
> >> > post this patch here, thanks for his good job.
> >>
> >> > --- php-5.2.13-fpm-0.5.13.diff 2010-05-07 10:13:14.450172083 +0800
> >> > +++ php-5.2.13-fpm-0.5.13.diff.new 2010-05-07 10:08:49.700180313
> >> > +0800
> >> > @@ -32944,7 +32944,7 @@
> >> > + getrlimit(RLIMIT_NOFILE, &r);
> >> > +
> >> > + r.rlim_cur = (rlim_t) wp->config->rlimit_files;
> >> > -+
> >> > ++ r.rlim_max = r.rlim_cur;
> >> > + if (0 > setrlimit(RLIMIT_NOFILE, &r)) {
> >> > + zlog(ZLOG_STUFF, ZLOG_SYSERROR,
> "setrlimit(RLIMIT_NOFILE)
> >> > failed");
> >> > + }
> >> > @@ -32956,7 +32956,7 @@
> >> > + getrlimit(RLIMIT_CORE, &r);
> >> > +
> >> > + r.rlim_cur = wp->config->rlimit_core == -1 ? (rlim_t)
> >> > RLIM_INFINITY : (rlim_t) wp->config->rlimit_core;
> >> > -+
> >> > ++ r.rlim_max = r.rlim_cur;
> >> > + if (0 > setrlimit(RLIMIT_CORE, &r)) {
> >> > + zlog(ZLOG_STUFF, ZLOG_SYSERROR, "setrlimit(RLIMIT_CORE)
> >> > failed");
> >> > + }
> >>
> >> > The patch could be patched by:
> >>
> >> > tar jxvf php-5.2.13.tar.bz2
> >> > gzip -d php-5.2.13-fpm-0.5.13.diff.gz
> >> > patch -p0 < php-5.2.13-fpm-0.5.13.diff.diff
> >>
> >> > Dose some one review this patch and check it into the sources?
> >>
> >> > Thx!
> >
>

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 128
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready