You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2010/04/27 20:12:20 UTC
DO NOT REPLY [Bug 49203] New: spawning new process if needed
https://issues.apache.org/bugzilla/show_bug.cgi?id=49203
Summary: spawning new process if needed
Product: Apache httpd-2
Version: 2.2.15
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_fcgid
AssignedTo: bugs@httpd.apache.org
ReportedBy: erno.kovacs@freemail.hu
I have latest stable Apache 2.2 and mod_fcgid with the following config:
#################################################################### mod_fcgid
begin
AddHandler fcgid-script .php
FcgidMaxRequestsPerProcess 10000
FcgidFixPathinfo 1
FcgidZombieScanInterval 5
FcgidBusyScanInterval 5
FcgidBusyTimeout 120
FcgidIOTimeout 120
FcgidIdleTimeout 300
FcgidProcessLifetime 3600
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 10000
FcgidInitialEnv PHP_FCGI_CHILDREN 0
FcgidWrapper "/usr/local/phpw3/bin/php-cgi -c /usr/local/apache/conf/php.ini"
.php
FcgidMinProcessesPerClass 0
FcgidMaxProcessesPerClass 20
FcgidMaxProcesses 20
FcgidPassHeader Authorization
#################################################################### mod_fcgid
end
I just created the following simple test scripts:
test1.php:
<?
sleep(60);
echo "hello delayed world! ".date("r");
?>
test2.php:
<?
echo "hello world! ".date("r");
?>
then i call test1.php, then a few seconds later test1.php AGAIN, and then
test2.php.
Test2.php returns immediately, as expected, the other two are "working".
In the process list I can see two php processes spawned.
Then Test1.php returns after 60 seconds, as expected:
hello delayed world! Tue, 27 Apr 2010 19:59:05 +0200
but 2nd instance of test1.php is not finished a few seconds later as expected,
since is is being started just then after 1st instance of test1.php is ready,
since it returns this message:
hello delayed world! Tue, 27 Apr 2010 20:00:05 +0200
Well, the module might be designed this way, but I dont like it. mod_fcgid did
not reach the max processes limit, but it enqueued and waited 60 seconds for
the 2nd request. This is not really well.
Would you add some config options to tweak situations like this? For eg.
something like FcgidRatherSpawnThanWaitInterval
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49203] spawning new process if needed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49203
--- Comment #1 from Jeff Trawick <tr...@apache.org> 2010-04-27 15:07:00 EDT ---
With LogLevel debug, what messages are logged by mod_fcgid when you run this
testcase?
I can't reproduce the problem with mod_fcgid 2.3.5 or with the latest from
subversion.
[Tue Apr 27 15:01:04 2010] [debug] fcgid_proc_unix.c(354): mod_fcgid: call
/export/home/trawick/myhg/apache/fcgid/apps/test1.php with wrapper
/usr/php/5.2/bin/php-cgi
[Tue Apr 27 15:01:04 2010] [info] mod_fcgid: server
twcdns.fastsearch.net:/export/home/trawick/myhg/apache/fcgid/apps/test1.php(5383)
started
[Tue Apr 27 15:01:07 2010] [debug] fcgid_proc_unix.c(354): mod_fcgid: call
/export/home/trawick/myhg/apache/fcgid/apps/test1.php with wrapper
/usr/php/5.2/bin/php-cgi
[Tue Apr 27 15:01:07 2010] [info] mod_fcgid: server
twcdns.fastsearch.net:/export/home/trawick/myhg/apache/fcgid/apps/test1.php(5387)
started
[Tue Apr 27 15:01:10 2010] [debug] fcgid_proc_unix.c(354): mod_fcgid: call
/export/home/trawick/myhg/apache/fcgid/apps/test2.php with wrapper
/usr/php/5.2/bin/php-cgi
[Tue Apr 27 15:01:10 2010] [info] mod_fcgid: server
twcdns.fastsearch.net:/export/home/trawick/myhg/apache/fcgid/apps/test2.php(5390)
started
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49203] spawning new process if needed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49203
--- Comment #3 from erno.kovacs@freemail.hu 2010-04-29 09:21:07 EDT ---
it might be another issue related to mod_fcgid+mod_vhost_cdb combination
described in my other bug report here:
https://issues.apache.org/bugzilla/show_bug.cgi?id=48981
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49203] spawning new process if needed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49203
--- Comment #7 from erno.kovacs@freemail.hu 2010-05-16 17:13:09 EDT ---
I just added some more debug lines to bridge_request and also fcgid_handler, i
can say, fcgid_handler (so the "entry point") is called with that 60seconds
delay as well, so this must be some Apache related "problem".
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49203] spawning new process if needed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49203
--- Comment #2 from erno.kovacs@freemail.hu 2010-04-29 09:17:01 EDT ---
output of test1.php instance #1:
hello delayed world! Thu, 29 Apr 2010 15:12:46 +0200
output of test1.php instance #2:
hello delayed world! Thu, 29 Apr 2010 15:13:46 +0200
output of test2.php:
hello world! Thu, 29 Apr 2010 15:11:57 +0200
in error_log:
[Thu Apr 29 15:11:46 2010] [debug] fcgid_proc_unix.c(354): mod_fcgid: call
DOCROOT/test1.php with wrapper /usr/local/phpw3/bin/php-cgi -c
/usr/local/apache/conf/php.ini
[Thu Apr 29 15:11:46 2010] [info] mod_fcgid: server :DOCROOT/test1.php(25724)
started
[Thu Apr 29 15:11:57 2010] [debug] fcgid_proc_unix.c(354): mod_fcgid: call
DOCROOT/test2.php with wrapper /usr/local/phpw3/bin/php-cgi -c
/usr/local/apache/conf/php.ini
[Thu Apr 29 15:11:57 2010] [info] mod_fcgid: server :DOCROOT/test2.php(25725)
started
thats all.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49203] spawning new process if needed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49203
--- Comment #12 from erno.kovacs@freemail.hu 2010-05-24 05:30:57 EDT ---
Any hints how to debug this issue?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49203] spawning new process if needed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49203
erno.kovacs@freemail.hu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #14 from erno.kovacs@freemail.hu 2010-05-24 15:37:56 EDT ---
You are right. It was indeed a Firefox feature...
Using telnet to send the raw requests the module works as expected.
Thank you.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49203] spawning new process if needed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49203
--- Comment #13 from Jeff Trawick <tr...@apache.org> 2010-05-24 13:33:01 EDT ---
(In reply to comment #12)
> Any hints how to debug this issue?
How are you issuing the requests?
Can you run the requests with a couple of telnet or netcat sessions over
loopback and see if the delay entering the handler still exists?
something vaguely like this,
telnet 127.0.0.1 80
>GET /test2.php HTTP/1.1
>Host: yyy
>
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49203] spawning new process if needed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49203
--- Comment #4 from Jeff Trawick <tr...@apache.org> 2010-04-29 16:14:18 EDT ---
Hi Erno,
Are you able to test your outstanding issues using the latest mod_fcgid from
svn?
I just committed a change (revision 939472) that solves a vhost-matching
problem I encountered, and based on looking at the sources of mod_vhost_cdb I
expect it solves a problem with that module as well.
The aspect that I fixed is related to the observation you made in PR 48981:
"This means virtualhost is the same string but not on the same memory address."
(I had seen that some time ago with VirtualHost containers that didn't include
unique ServerName directives.)
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49203] spawning new process if needed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49203
--- Comment #11 from erno.kovacs@freemail.hu 2010-05-18 05:30:09 EDT ---
This way I am not sure any longer if this is an issue of mod_fcgid but the core
itself?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49203] spawning new process if needed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49203
--- Comment #5 from erno.kovacs@freemail.hu 2010-05-02 18:24:57 EDT ---
I just repeated the test with latest mod fcgid from svn.
Started test1.php, then test1.php again, and then test2.php with a few seconds
delay among them.
Output of test1.php instance #1:
hello delayed world! Mon, 03 May 2010 00:20:48 +0200
Output of test1.php instance #2:
hello delayed world! Mon, 03 May 2010 00:21:48 +0200
Output of test2.php:
hello world! Mon, 03 May 2010 00:19:52 +0200
full error_log:
[Mon May 03 00:19:32 2010] [info] mod_ssl/2.2.15 compiled against Server:
Apache/2.2.15, Library: OpenSSL/0.9.8g
[Mon May 03 00:19:32 2010] [info] mod_fcgid: Process manager 18110 started
[Mon May 03 00:19:32 2010] [notice] Apache/2.2.15 (Unix) mod_ssl/2.2.15
OpenSSL/0.9.8g mod_fcgid/2.3.6-dev configured -- resuming normal operations
[Mon May 03 00:19:32 2010] [info] Server built: Apr 6 2010 11:11:49
[Mon May 03 00:19:32 2010] [debug] worker.c(1757): AcceptMutex: sysvsem
(default: sysvsem)
[Mon May 03 00:19:48 2010] [debug] mod_vhost_cdb.c(170): [client MYIP]
set_doc_root: server_hostname: DOCROOT
[Mon May 03 00:19:48 2010] [info] mod_fcgid: server
DOCROOT:/usr/local/phpw3/bin/php-cgi(18173) started
[Mon May 03 00:19:51 2010] [debug] mod_vhost_cdb.c(170): [client MYIP]
set_doc_root: server_hostname: DOCROOT
[Mon May 03 00:19:52 2010] [info] mod_fcgid: server
DOCROOT:/usr/local/phpw3/bin/php-cgi(18177) started
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49203] spawning new process if needed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49203
--- Comment #6 from erno.kovacs@freemail.hu 2010-05-16 17:04:44 EDT ---
Since I still have the issue, I did some debugging, let me share my
experiences.
Starting test1.php twice then test2.php results the following debug messages:
[Sun May 16 22:59:14 2010] [error] [client myip] mod_fcgid: handle_request for
DOCROOT/test1.php
[Sun May 16 22:59:14 2010] [error] procmgr_peek_cmd returned a command
[Sun May 16 22:59:14 2010] [error] mod_fcgid: cmdline:
/usr/local/phpw3/bin/php-cgi -c /usr/local/apache/conf/php.ini
[Sun May 16 22:59:14 2010] [error] mod_fcgid: !current_node, spawn ALLOWED
[Sun May 16 22:59:15 2010] [error] [client myip] mod_fcgid: handle_request for
DOCROOT/test2.php
[Sun May 16 22:59:16 2010] [error] procmgr_peek_cmd returned a command
[Sun May 16 22:59:16 2010] [error] mod_fcgid: cmdline:
/usr/local/phpw3/bin/php-cgi -c /usr/local/apache/conf/php.ini
[Sun May 16 22:59:16 2010] [error] mod_fcgid: score stuff, spawn ALLOWED
[Sun May 16 23:00:14 2010] [error] [client myip] mod_fcgid: handle_request for
DOCROOT/test1.php
As you can see, 2nd request to test2.php was started just after 1st one
finished, no is_spawn_stuff was called, neither proc manager was touched.
Do fastcgi processes have any queues ?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49203] spawning new process if needed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49203
--- Comment #9 from erno.kovacs@freemail.hu 2010-05-16 17:26:51 EDT ---
I forgot to mention in the original post, I am using mpm_worker, it might be
related to the issue. Config is almost default:
MaxClients 400
ServerLimit 16
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
ThreadStackSize 131072
MaxRequestsPerChild 10000
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49203] spawning new process if needed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49203
--- Comment #10 from erno.kovacs@freemail.hu 2010-05-17 06:55:53 EDT ---
I just tested, I can reproduce the issue using mpm-prefork as well, so its
probably not an mpm related problem.
If you need me to do any more tests, just let me know.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49203] spawning new process if needed
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49203
--- Comment #8 from erno.kovacs@freemail.hu 2010-05-16 17:19:59 EDT ---
So, complete logs:
[Sun May 16 23:08:25 2010] [notice] Apache/2.2.15 (Unix) mod_ssl/2.2.15
OpenSSL/0.9.8g mod_fcgid/2.3.6-dev configured -- resuming normal operations
[Sun May 16 23:08:29 2010] [error] [client my ip] mod_fcgid: fcgid_handler:
DOCROOT/test1.php
[Sun May 16 23:08:29 2010] [error] [client my ip] mod_fcgid: bridge_request for
DOCROOT/test1.php
[Sun May 16 23:08:29 2010] [error] [client my ip] mod_fcgid: handle_request for
DOCROOT/test1.php
[Sun May 16 23:08:29 2010] [error] procmgr_peek_cmd returned a command
[Sun May 16 23:08:29 2010] [error] mod_fcgid: cmdline:
/usr/local/phpw3/bin/php-cgi -c /usr/local/apache/conf/php.ini
[Sun May 16 23:08:29 2010] [error] mod_fcgid: !current_node, spawn ALLOWED
[Sun May 16 23:08:30 2010] [error] [client my ip] mod_fcgid: fcgid_handler:
DOCROOT/test2.php
[Sun May 16 23:08:30 2010] [error] [client my ip] mod_fcgid: bridge_request for
DOCROOT/test2.php
[Sun May 16 23:08:30 2010] [error] [client my ip] mod_fcgid: handle_request for
DOCROOT/test2.php
[Sun May 16 23:08:31 2010] [error] procmgr_peek_cmd returned a command
[Sun May 16 23:08:31 2010] [error] mod_fcgid: cmdline:
/usr/local/phpw3/bin/php-cgi -c /usr/local/apache/conf/php.ini
[Sun May 16 23:08:31 2010] [error] mod_fcgid: score stuff, spawn ALLOWED
[Sun May 16 23:09:29 2010] [error] [client my ip] mod_fcgid: fcgid_handler:
DOCROOT/test1.php
[Sun May 16 23:09:29 2010] [error] [client my ip] mod_fcgid: bridge_request for
DOCROOT/test1.php
[Sun May 16 23:09:29 2010] [error] [client my ip] mod_fcgid: handle_request for
DOCROOT/test1.php
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org