Bug 37470 - mod_jk doesn
Summary: mod_jk doesn
Status: RESOLVED DUPLICATE of bug 37469
Alias: None
Product: Tomcat Connectors
Classification: Unclassified
Component: Common (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-11 18:07 UTC by Renato
Modified: 2008-10-05 03:09 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Renato 2005-11-11 18:07:36 UTC
1. Create a httpd.conf with 1500 websites. Every VirtualHost section should be 
like this:

<VirtualHost xxxx>
ServerName testXXX
ServerAlias testXXX.com
ServerAdmin webmaster@testXXX.com
DocumentRoot /home/testXXX/public_html
ScriptAlias /cgi-local/ /home/testXXX/public_html/cgi-local/
SetEnv LOG_SUBDIR testXXX
SuexecUserGroup testXXX testXXX
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
</VirtualHost>
<VirtualHost xxxx:443>
ServerName testXXX
ServerAlias testXXX.com
ServerAdmin webmaster@testXXX.com
DocumentRoot /home/testXXX/public_html
ScriptAlias /cgi-local/ /home/testXXX/public_html/cgi-local/
SetEnv LOG_SUBDIR testXXX
SuexecUserGroup testXXX testXXX
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
</VirtualHost>

2. create a simple script:

#!/usr/bin/perl

print "Content-Type: text/html\n\n";
print "Test!!";

3. execute on the web
  
Actual results:

In a Dual Xeon, zero load, it takes 2 seconds to run.

I did some straces:

strace -T -f -p xxxxx

[pid 30864] read(4, "", 4096)           = 0 <0.000022>
[pid 30864] close(4)                    = 0 <0.000016>
[pid 30864] read(3, "", 4096)           = 0 <0.000014>
[pid 30864] close(3)                    = 0 <0.000012>
[pid 30864] write(1, "Content-Type: text/html\n\nTest"..., 72) = 72 <0.000020>
[pid 30785] <... poll resumed> [{fd=26, events=POLLIN, revents=POLLIN}, {fd=28, 
events=POLLIN}], 2, 30000) = 1 <2.120682>

In "LogLevel debug", I see: 

[Fri Nov 11 12:55:50 2005] [25756:39072] [debug] jk_cleanup_shmem::mod_jk.c 
(1761): Shmem cleanup
[Fri Nov 11 12:55:53 2005] [25756:39072] [debug] jk_cleanup_shmem::mod_jk.c 
(1761): Shmem cleanup

(> 2 seconds !!)

If I remove all the JkMount mapping, the CGI execution is very fast. So there 
is definitely an issue with mod_jk. 

with mod_jk -> more than 2 seconds
without mod_jk -> a few milliseconds

OBS: Those tests were done in a server without load. I simply turn apache 
2.0.52 on and requested the CGI execution. 

I can test any patch.
Comment 1 Yoav Shapira 2005-11-16 20:15:25 UTC

*** This bug has been marked as a duplicate of 37469 ***