Re: Minimize startup timeout on dynamic fastcgi

Eugene <my-subscr-JGs/[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
Hi, Stefan!

Thank you for your help!
I'll try to appply a patch to 5.1.2 version and write about my excersises.


Yours,
Eugene


Stefan Wendt пишет:

> Hi Eugene,
>
> I haven't tried this at all. I am using 4.2.2 with the patch mentioned 
> earlier and this works.
>
> The new php fcgi code is very new. If you want to continue to go this 
> way, I suggest
> you get in contact with *[email protected]. He seams to be the guy in 
> control of
> that section of the code. I might be able to resolve the problems you 
> mention
> in you last post.
>
> Personally, I would try to manually patch 5.1.2.
>
> I'd love to help, buy my time for this sort of work is very limited 
> and I don't
> need php 5.x at this point in time.
>
> Whatever you do, please keep the mailing list posted for future 
> reference for
> people that want to go the same way.
>
> Stefan
> *
> Eugene wrote:
>
>> Hi Stephan!
>>
>> I tried to install latest snapshot php5.1-200604051630 to my debug 
>> server:
>> i386 + Linux Fedocra Core 4 + Apache 2.0.55 + 
>> mod_fastcgi-SNAP-0404142202
>> PHP was compiled with minimal options:
>> './configure' '--enable-fastcgi' '--enable-force-cgi-redirect' 
>> '--with-mysql=shared' '--prefix=/usr/local/php5'
>> It works and identifies itself as PHP Version 5.1.3RC3-dev.
>>
>> But there's some additional strange moments:
>>
>> Here's access_log:
>> 212.176.x.x - - [06/Apr/2006:13:31:53 +0400] "GET /1.php HTTP/1.1" 1 
>> 33417
>> 212.176.x.x - - [06/Apr/2006:13:31:54 +0400] "GET 
>> /1.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146
>> 212.176.x.x - - [06/Apr/2006:13:33:10 +0400] "GET /1.php HTTP/1.1" 1 
>> 33417
>> 212.176.x.x - - [06/Apr/2006:13:33:11 +0400] "GET 
>> /1.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146
>> 24.87.52.26 - - [06/Apr/2006:13:37:01 +0400] "GET 
>> http://proxyking.servehttp.com:8080/pk/service?service=Echo HTTP/1.0" 
>> 404 373
>> 212.176.x.x - - [06/Apr/2006:13:40:09 +0400] "GET /1.php HTTP/1.1" 1 
>> 33417
>> 212.176.x.x - - [06/Apr/2006:13:40:10 +0400] "GET 
>> /1.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146
>> 212.176.x.x - - [06/Apr/2006:13:40:38 +0400] "GET /1.php HTTP/1.1" 1 
>> 33417
>> 212.176.x.x - - [06/Apr/2006:13:40:43 +0400] "GET 
>> /1.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146
>>
>> BTW: whats' the strange HTTP code 1 ?
>>
>> Here's error_log:
>>
>> [Thu Apr 06 13:31:50 2006] [notice] SIGHUP received. Attempting to 
>> restart
>> [Thu Apr 06 13:31:51 2006] [notice] FastCGI: wrapper mechanism 
>> enabled (wrapper: /usr/local/apache2/bin/suexec)
>> [Thu Apr 06 13:31:51 2006] [notice] FastCGI: process manager 
>> initialized (pid 5730)
>> [Thu Apr 06 13:31:51 2006] [notice] Apache/2.0.55 (Unix) 
>> mod_ssl/2.0.55 OpenSSL/0.9.7f DAV/2 
>> mod_fastcgi/mod_fastcgi-SNAP-0404142202 configured -- resuming normal 
>> operations
>> [Thu Apr 06 13:31:53 2006] [warn] FastCGI: (dynamic) server 
>> "/usr/local/apache2/htdocs/fcgi-bin/php5.fcgi" (uid 504, gid 504) 
>> started (pid 5736)
>> [Thu Apr 06 13:31:54 2006] [error] [client 212.176.x.x] 
>> (104)Connection reset by peer: FastCGI: comm with server 
>> "/usr/local/apache2/htdocs/fcgi-bin/php5.fcgi" aborted: read failed
>> [Thu Apr 06 13:33:11 2006] [error] [client 212.176.x.x] 
>> (104)Connection reset by peer: FastCGI: comm with server 
>> "/usr/local/apache2/htdocs/fcgi-bin/php5.fcgi" aborted: read failed
>> [Thu Apr 06 13:37:01 2006] [error] [client 24.87.52.26] File does not 
>> exist: /usr/local/apache2/htdocs/pk
>> [Thu Apr 06 13:40:09 2006] [error] [client 212.176.x.x] 
>> (104)Connection reset by peer: FastCGI: comm with server 
>> "/usr/local/apache2/htdocs/fcgi-bin/php5.fcgi" aborted: read failed
>> [Thu Apr 06 13:40:10 2006] [warn] FastCGI: (dynamic) server 
>> "/usr/local/apache2/htdocs/fcgi-bin/php5.fcgi" (pid 5736) termination 
>> signaled
>> [Thu Apr 06 13:40:10 2006] [warn] FastCGI: (dynamic) server 
>> "/usr/local/apache2/htdocs/fcgi-bin/php5.fcgi" (pid 5736) terminated 
>> by calling exit with status '0'
>> [Thu Apr 06 13:40:40 2006] [warn] FastCGI: (dynamic) server 
>> "/usr/local/apache2/htdocs/fcgi-bin/php5.fcgi" (uid 504, gid 504) 
>> restarted (pid 5791)
>> [Thu Apr 06 13:40:42 2006] [error] [client 212.176.x.x] 
>> (104)Connection reset by peer: FastCGI: comm with server 
>> "/usr/local/apache2/htdocs/fcgi-bin/php5.fcgi" aborted: read failed
>> [Thu Apr 06 13:46:52 2006] [warn] FastCGI: (dynamic) server 
>> "/usr/local/apache2/htdocs/fcgi-bin/php5.fcgi" (pid 5791) termination 
>> signaled
>> [Thu Apr 06 13:46:52 2006] [warn] FastCGI: (dynamic) server 
>> "/usr/local/apache2/htdocs/fcgi-bin/php5.fcgi" (pid 5791) terminated 
>> by calling exit with status '0'
>>
>>
>> First run is fine and quick. But after I see error 104 - connection 
>> reset by peer.
>> After some time PHP was said to stop and it stopped. But socket 
>> resided (and have lastmod time 13:31 - i.e. Apache startup).
>> On next page load @13:40:09 apache uses it. Hmm... just after that 
>> php was killed - because timout is over. But it lookes like process 
>> cound be killed during the request! Is it possible to use idle to 
>> timeouts rather that work timout to secide what must be killed?
>> Later at 13:40:38 apache tried to use the socket but insuccessful - 
>> so after timeout it had to restart php.
>> Very strange moment - why socket resides while peer is killed?
>>
>> May be we need more fresh version of mod_fastcgi which is aware of 
>> peer process status or can drop the socket at least?
>>
>> Currently I'm not sure bugs are because of the PHP only. It dies as 
>> it receives signal, but the problem resides.
>>
>> Thank you.
>>
>> Yours,
>> Eugene
>>
>>
>>
>>
>>> The patch does not directly apply to php 5.1.2. I am using this 
>>> patch ontop of 4.4.2.
>>> If you compare the difference between both version:
>>> (diff php-5.1.2/sapi/cgi/cgi_main.c php-4.4.2/sapi/cgi/cgi_main.c)
>>> Then you see that they share the essential code, most of the changes
>>> seam to be of cosmetic nature.
>>> If you understand the basics, then you should be able to patch that 
>>> file manually (untested).
>>>
>>> Alternatively, you could also go with the latest snapshot of the 
>>> 5.1.x.(>5.1.2) The fast_cgi
>>> code was written from scratch.
>>>
>>> Stefan Wendt
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> ___________________________________
>> fastcgi-developers mailing list
>> http://fastcgi.com/fastcgi-developers/
>>
>>
>>
>>
>
>
>

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.