Best unofficial Apache Server developers community |
| |||||
| Jun 28, 2010 | |||||
|
Tony Anecito |
|
||||
| Tags: | |||||
Similar Threads
APR usage question regarding multi-core and mutliple virtual hosts...
Hi All,
I noticed using Firefox with a plugin yslow that it recommends using only
4 virtual hosts instead of the 16 I have for serving images. I am using a 6
core system and want to make sure I take advantage of it using Apache APR
so I setup more than 4 virtual hosts.
I am using multiple virtual hosts for serving images since I heard that
can improve user response time where they have browsers with 4 or more
concurrent connections supported. I have a screenshots page where I have 24
thumbnails being loaded into the browser and I am trying to tune APR for
the best user response time.
So any best practice for this you all would recommend?
Thanks,
-Tony
Re: [users@httpd] Multi domain certificate and named virtual hosts
Post a question and let the community help. Kevin http://kevincastellow.workintel.com On Fri, May 21, 2010 at 7:03 AM, Chris Johnson <john### @nmr.mgh.harvard.edu>wrote: Hi. I really need to talk to someone offline who has multi domain certificates and named virtual hosts configured, up and running please. I'm using CentOS 4.7 and 5.4 with Apache 2.x. Help greatly appreciated.
Re: mod_ssl, SNI and dynamic virtual hosts
Adam Hasselbalch Hansen wrote: We have a setup that uses an in-house module which works not entirely unlike mod_vhost_alias, in that it has a single virtual host configured, and then determines stuff like domain name, docroot, etc, from the request. We'd love to be able to use SSL in this setup, but as far as I can see, the only way to do this would be to change (i.e. hack) mod_ssl to do the certificate loading sometime around request-time, since the apache server and SSL have no clue what virtual hosts they will be serving at startup. How would such a hack, if at all possible, affect stuff like certificate caching and other things? I'd love any feedback! Anyone?
basic 2 virtual hosts configuration
to deploy 2 virtual hosts in Tomcat 5.5.29 (no Apache) what more than
the server.xml file below and a context.xml per each host in Catalina do
you need to set up?
Where do I set path, like for "/"? Alright in the context file (see
below)?
server.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Server port="8005" shutdown="SHUTDOWN">
<GlobalNamingResources>
<!-- Used by Manager webapp -->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="80" />
<Engine name="Catalina" defaultHost="kron">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase" />
<Host name="medpsy" appBase="/home/webbplatser/medpsy.no" />
<Host name="kron" appBase="/home/webbplatser/kron.no" />
</Engine>
</Service>
</Server>
Fragment context settings in /Catalina/kron/ROOT.xml (similar for the
other site:
<?xml version="1.0" encoding="UTF-8"?>
<Context
docBase="/home/webbplatser/kron.no/ROOT"
path="/"
reloadable="true"
workDir="work/Catalina/kron/_">
<Listener className="org.apache.catalina.startup.TldConfig"/>
</Context>:
This set up doesn't serve a pages physically put in any of the ROOT
folders of the sites. I get blank pages.
GUIDES?
Anyone that can point to a guide that focuses only on the steps
necessary to configure Tomcat 5.5.x for 2 or more virtual hosts?
Preferably without involvement with Apache.
Re: NameVirtualHost Directive - - - - Multiple SSL virtual hosts
Duane, Thanks for responding to my post. The error message I get from using the NameVirgualHost command is: [Sat Jun 05 15:38:49 2010] [warn] NameVirtualHost 192.168.0.93:80 has no VirtualHosts Here is a copy and paste right out of my httpd.conf Listen 192.168.0.93:80 Listen 192.168.0.200:80 NameVirtualHost 192.168.0.93:80 I had in each virtual host configured with the IP address when I received that error. When I tried your example using the fqdn in the <VirtualHost fqdn.com> container, I mulitple errors like this: [Sat Jun 05 15:51:21 2010] [warn] VirtualHost fqdn1.com:80 overlaps with VirtualHost fqdn2.com:80, the first has precedence, perhaps you need a NameVirtualHost directive This is repeated for every name-based virtual host I have until I added the fqdns to /etc/hosts. However, I still get the error message about NameVirtualHost 192.168.0.93 has no Virtual Hosts Concerning your suggestion for the wild card certificate, I see there is a multi-domain certificate offered that seems like just what I need. I wonder how I configure my SSLCertificateFile and SSLCertificateKeyFile directives. Do I simply point these directives to the same files within the different ip-based virtual hosts? Something like this: <VirtualHost 192.168.0.200:443> SSLCertificateFile "/files/server.crt" SSLCertificateKeyFile "/files/server.key" </VirtualHost> <VirtualHost 192.168.0.201:443> SSLCertificateFile "/files/server.crt" SSLCertificateKeyFile "/files/server.key" </VirtualHost> <VirtualHost 192.168.0.202:443> SSLCertificateFile "/files/server.crt" SSLCertificateKeyFile "/files/server.key" </VirtualHost> -----Original Message----- From: "Duane Winner" [dua### @duanewinner.net] Date: 06/04/2010 03:23 PM To: use### @httpd.apache.org Subject: Re: [us### @httpd] NameVirtualHost Directive - - - - Multiple SSL virtual hosts On Fri, Jun 4, 2010 at 6:10 PM, Jeff Shearer <jef### @shearer-family.org> wrote: I have an Apache 2.2 server sitting on a box with one physical address and multiple virtual addresses. The physical address servers my name-based virtual hosts where as the virtual addresses server ip-based virtual hosts. I read about the NameVirtualHost directive and tried to implement it but it seems it does nothing but cause error messages. I tried to put into the main server config near my listen directives and received an error that there was no virtual host despite the fact that there are more than one virtual host. I also tried to put it just before each of the virtual host directives and received errors. Is this directive needed, everything seems to work fine with out it. What are the error messages? For your physical address serving your virtual hosts you should have: Listen your-physical-ip:80 Listen your-physical-ip:443 NameVirtualHost your-physical-ip7:80 NameVirtualHost your physical-ip:443 ... Then for each virtual host served by physical IP, all you need is: <VirtualHost virtual.host.fqdn:80> ServerName virtual.host.fqdn ... </VirtualHost> <VirtualHost virtual.host.fqdn:443> ServerName virtual.host.fqdn ... </VirtualHost> Also, for each virtual host, youll need an entry in /etc/hosts: your-physical-ip virtual.host.fqdn1 your-physical-ip virtual.host.fqdn2 etc. In a related matter. I am having trouble implementing a second https server one of virtual ip addresses. Both domains have permanent redirects to the https port. However, the second ssl server does not even show up when I conduct a port scan on its ip address. Yet both have the same SSL configuration elements. I have compared the two configurations and I see absolutely no difference except of course the SSL certificate and server key targets. When I disable the permanent redirect, I have not trouble getting to the domain on port 80. Is it possible to run 2 https servers using different virtual addresses on the same physical server? Yes -- its not recommended by apache, but its done. The clients will either get warnings about the certificate being invalid, or you can get a wildcard certificate if all your virtual ssl hosts use the same domain name (box1.mydomain.com, box2.mydomain,com, box3.mydomain.com, etc.). Apache still doesnt like this and will spit warnings, but it works.
RE: NameVirtualHost Directive - - - - Multiple SSL virtual hosts
Thanks that's great news. I am still trying to resolve this error message I am getting. Eric said I need to be certain that my NameVirtualHost and VirtualHost directives matched literally. I reread the documentation on http://httpd.apache.org and see what I believe is the same statement said differently. That the directives must match. I checked each of the directives on my development server and they match. Here are the greps: NameVirtualHost 192.168.0.93:80 <VirtualHost 192.168.0.93:80> <VirtualHost 192.168.0.93:80> <VirtualHost 192.168.0.93:80> <VirtualHost 192.168.0.93:80> <VirtualHost 192.168.0.93:80> I also carefully verified that my /etc/hosts include a fqdn for each of the VirtualHosts served from my development server. Yet, I get the following error: [Sun Jun 06 14:02:11 2010] [warn] NameVirtualHost 192.168.0.93:80 has no VirtualHosts I am going nuts here with this. What am I missing? Thanks.
Server configuration port - Virtual hosts
I need to have a website running in IIS on port 80, and message queue on port 80. Is that possible? They would have different DNS addresses, and can have multiple IPs for the machine. Or at least both of them accessible from a port 80 request. Is there some way to have a virtual host between IIS and ActiveMQ or anything? The main help i need is simply which direction should i explore for this, i should be able to figure out the specific configuration myself after i know what direction should work. From my basic knowledge in the area I would think it is not possible, but i'm being told to see if i can find any solution. My thought would be it should be possible to run the message queue on say port 81, and have IIS forward any traffic that goes to its DNS to that port, but i really have no clue how to configure IIS to do that either. This is on a Windows Server 2007 box. The reason for this is that the producer for the message queue is behind a strict firewall that we can't get anything but http on port 80 to work, and we seem to not have enough servers to dedicate one to a message queue on port 80. Thanks for any help you can give me.
RE: NameVirtualHost Directive - - - - Multiple SSL virtual hosts
Manoj, I am using 2.2.11. Hmmmmm. Are you saying if I move to 2.2.12 I can server multiple name-based ssl virtual hosts on the same IP and ports? Even so, I may choose to use a multi-domain SSL certificate. Being able to use this for up to 25 domains seems like a lower cost alternative to buying 25 separate certificates.. Have you had any experience with this? If so, do you know how to configure the virtual hosts for this? I am guessing one just points the SSL directives in each VirutalHost to the same server key and certificate. But please, advise if you know for certain how this works. Thanks. -----Original Message----- From: "Manoj Samtani" [manoj.### @hotmail.com] Date: 06/06/2010 10:20 AM To: us### @httpd.apache.org Subject: RE: [us### @httpd] NameVirtualHost Directive - - - - Multiple SSL virtual hosts Which Apache version are you using? Till now Multiple SSL VHOST's are not available for same port and IP. This can be possible through Apache 2.2.12. So, you do not need to take tension ;-) Just change your Apache Version. Regards, Manoj Date: Sat, 5 Jun 2010 16:12:09 -0400 From: cov### @gmail.com To: use### @httpd.apache.org Subject: Re: [us### @httpd] NameVirtualHost Directive - - - - Multiple SSL virtual hosts On Sat, Jun 5, 2010 at 4:08 PM, Jeff Shearer <jef### @shearer-family.org> wrote: > [Sat Jun 05 15:51:21 2010] [warn] VirtualHost fqdn1.com:80 overlaps with VirtualHost fqdn2.com:80, the first has precedence, perhaps you need a NameVirtualHost directive > > This is repeated for every name-based virtual host I have until I added the fqdns to /etc/hosts. However, I still get the error message about NameVirtualHost 192.168.0.93 has no Virtual Hosts > The arguments for your 1 NameVirtualHost and correspoinding N VirtualHosts have to be identical in the literal sense, not just logically the same. -- Eric Covener cove### @gmail.com
NameVirtualHost Directive - - - - Multiple SSL virtual hosts
I have an Apache 2.2 server sitting on a box with one physical address and multiple virtual addresses. The physical address servers my name-based virtual hosts where as the virtual addresses server ip-based virtual hosts. I read about the NameVirtualHost directive and tried to implement it but it seems it does nothing but cause error messages. I tried to put into the main server config near my listen directives and received an error that there was no virtual host despite the fact that there are more than one virtual host. I also tried to put it just before each of the virtual host directives and received errors. Is this directive needed, everything seems to work fine with out it. In a related matter. I am having trouble implementing a second https server one of virtual ip addresses. Both domains have permanent redirects to the https port. However, the second ssl server does not even show up when I conduct a port scan on its ip address. Yet both have the same SSL configuration elements. I have compared the two configurations and I see absolutely no difference except of course the SSL certificate and server key targets. When I disable the permanent redirect, I have not trouble getting to the domain on port 80. Is it possible to run 2 https servers using different virtual addresses on the same physical server?
mod_jk and tomcat virtual hosts not connecting
Hi, First of all I would like to mention that this is my first post on this list, I hope that this question is sent in the right place. I have tried finding a solution for my problem, but it either doesn't exist, or my limited brain can't manage to figure out how to do it (I strongly hope it is the latter). My issue is with the mod_jk plugin. I want to redirect my subdomain requests jira.example.com to a tomcat 6 virtual host called jiraapp. If I call the subdomain jira.example.com Im always getting the default tomcat 6 host called localhost. I tested every part: 1.) mod_jk: if i change the workers name in either workers.properties or und er my enabled-site <VirtualHost> or if i change the mapping to my virtual host (/etc/hosts: 127.0.0.1 localhost jiraapp) apache doesnt start. So I think this should work and is configured right. 2.) if I do a lynx jiraapp:8080 on the machine it works and shows the right webapp. But if I access jira.example.com I always getting the default root-webapp of tomcat 6. So theres no difference in calling jira.example.com or example.com:8080. In general my setup looks like this: 1.) browse to jira.example.com 2.) apache <VirtualHost> hands over to mod_jk 3.) mod_jk redirects to worker.jiraworker.host:worker.jiraworker.port (jiraa pp:8009) via ajp 4.) jiraapp resolves to 127.0.0.1 trough /etc/hosts 5.) tomcat relays to the jiraapp name based virtual host Do I miss something here? My guess would be that iam doing something wrong in step 4 because i can call lynx jiraapp on the local bash (5) and i can access the default virtual host from remote (1-3). Help would be appreciated. Versions: Apache Tomcat/6.0.29 Sun-Java 1.6.0_20-b02 Apache/2.2.9 (Debian) mod_jk/1.2.26 proxy_html/3.0.0 Server libapache2-mod-jk 1:1.2.26-2+lenny1 == jk.load == LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so JkWorkersFile /etc/apache2/workers.properties JkLogFile /var/log/apache2/mod_jk.log JkLogLevel info # JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories -ForwardLocalAddress JkRequestLogFormat "%w %V %T" == workers.properties == workers.tomcat_home=/opt/tomcat workers.java_home=/usr/lib/jvm/java-6-sun worker.list=jiraworker worker.jiraworker.port=8009 worker.jiraworker.host=jiraapp worker.jiraworker.type=ajp13 == /etc/hosts == ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts 127.0.0.1 localhost.localdomain localhost jiraapp == server.xml === <Engine name="Catalina" defaultHost="localhost"> [...] <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> [...] </Host> <Host name="jiraapp" appBase="jiraapp" docBase="/opt/tomcat/jiraapp" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false" > == apache example.com virtual hosts configuration file == <VirtualHost *:80> ServerName www.jira.example.com ServerAlias jira.example.com JkMount /* jiraworker </VirtualHost>
Re: mod_jk and tomcat virtual hosts not connecting
Hi Moritz,
Try adding:
<Alias>jira.example.com</Alias>
<Alias>www.jira.example.com</Alias>
To the server.xml inside the <Host name="jirapp">
Best Regards,
Brett
-----Original Message-----
From: Moritz Winter [mailto:moritz.a### @googlemail.com]
Sent: Tuesday, July 27, 2010 7:11 PM
To: us### @tomcat.apache.org
Subject: mod_jk and tomcat virtual hosts not connecting
Hi, First of all I would like to mention that this is my first
post on
this list, I hope that this question is sent in the right place.
I have tried finding a solution for my problem, but it either
doesn't
exist, or my limited brain can't manage to figure out how to do
it (I
strongly hope it is the latter).
My issue is with the mod_jk plugin. I want to redirect my
subdomain
requests jira.example.com to a tomcat 6 virtual host called
jiraapp. If
I call the subdomain jira.example.com Im always getting the
default
tomcat 6 host called localhost.
I tested every part:
1.) mod_jk: if i change the workers name in either
workers.properties or
und er my enabled-site <VirtualHost> or if i change the
mapping
to my
virtual host (/etc/hosts: 127.0.0.1 localhost jiraapp) apache
doesnt
start. So I think this should work and is configured right.
2.) if I do a lynx jiraapp:8080 on the machine it works and
shows the
right webapp.
But if I access jira.example.com I always getting the default
root-webapp of tomcat 6. So theres no difference in calling
jira.example.com or example.com:8080. In general my setup looks
like this:
1.) browse to jira.example.com
2.) apache <VirtualHost> hands over to mod_jk
3.) mod_jk redirects to
worker.jiraworker.host:worker.jiraworker.port
(jiraa pp:8009) via ajp
4.) jiraapp resolves to 127.0.0.1 trough /etc/hosts
5.) tomcat relays to the jiraapp name based virtual host
Do I miss something here? My guess would be that iam doing
something
wrong in step 4 because i can call lynx jiraapp on the local
bash (5)
and i can access the default virtual host from remote (1-3).
Help would be appreciated.
Versions:
Apache Tomcat/6.0.29
Sun-Java 1.6.0_20-b02
Apache/2.2.9 (Debian) mod_jk/1.2.26 proxy_html/3.0.0 Server
libapache2-mod-jk 1:1.2.26-2+lenny1
== jk.load ==
LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
JkWorkersFile /etc/apache2/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel info
# JkOptions +ForwardKeySize +ForwardURICompat
-ForwardDirectories
-ForwardLocalAddress
JkRequestLogFormat "%w %V %T"
== workers.properties ==
workers.tomcat_home=/opt/tomcat
workers.java_home=/usr/lib/jvm/java-6-sun
worker.list=jiraworker
worker.jiraworker.port=8009
worker.jiraworker.host=jiraapp
worker.jiraworker.type=ajp13
== /etc/hosts ==
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
127.0.0.1 localhost.localdomain localhost jiraapp
== server.xml ===
<Engine name="Catalina" defaultHost="localhost">
[...]
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
[...]
</Host>
<Host name="jiraapp" appBase="jiraapp"
docBase="/opt/tomcat/jiraapp"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false" >
== apache example.com virtual hosts configuration file ==
<VirtualHost *:80>
ServerName www.jira.example.com
ServerAlias jira.example.com
JkMount /* jiraworker
</VirtualHost>
Brett Delle Grazie
Betr.: Re: [users@httpd] NameVirtualHost Directive - - - - Multiple SSL virtual hosts
NameVirtualHost your-physical-ip7:80 NameVirtualHost your physical-ip:443 ... <VirtualHost virtual.host.fqdn:80> The name after VirtualHost should match the name after NameVirtualHost, so this example is wrong, and should be <VirtualHost your-physical-ip7:80> Joost
apache tuning for svn
Hi Gurus, Any advise on initial tuning values for apache MinSpareServers, MaxSpareServers, and StartServers, tcp tunings, ulimits, sysctl.... I'm running svn 1.6 over apache2 pre-fork. System load goes high as much as 10 during heavy usage. What would be your recommended MaxRequestsPerChild for heavy svn usage? Thanks, West
Re: performance tuning - where does the slowness come from?
Weijunli, I also have an environment that has similar very large datasets with strict latency. Can you please elaborate on the custom changes you added to cassandra to meet these sla, either code or configuration. i am very interested in learning more about the internal workings of cassandra and performance. Thanx, Artie On Thu, May 6, 2010 at 10:06 AM, Weijun Li <weiju### @gmail.com> wrote: Our use case is a little different: our server is a typical high volume transaction server that processes more than half billion requests per day. The write/read ratio is close to 1, and the cluster needs to serve 10k write+read with strict latency (<20ms) otherwise the client will treat it as failure. Plus we have hundreds of millions of keys so the generated sstable files are much bigger that the ram size. In this case using mmap will cause Cassandra to use sometimes > 100G virtual memory which is much more than the physical ram, since we are using random partitioner the OS will be busy doing swap. I have finally customized cassandra to meet the above requirement by using cheap hardware (32G ram + SATA drives): one thing I learned is that you have to carefully avoid swapping, especially when you need to cache most of the keys in memory, swap can easily damage the performance of your in memory cache. I also made some optimizations to reduce memory/disk consumption and to make it easier for us to diagnose issues. In one word: cassandra is very well written but there's still huge potential for you to improve it to meet your special requirements. -Weijun On Wed, May 5, 2010 at 9:43 AM, Jordan Pittier <jordan.p### @gmail.com>wrote: > I disagree. Swapping could be avoided. I don't know Cassandra internals > mechanisms but what I am expecting is that whenever I want to read rows that > are not in RAM, Cassandra load them from hard drive to RAM if space is > available, and, if RAM is full to reply my query without saving rows in RAM. > No need for swapping. > > I have no try yet to change DiskAccessMode to standard, I hope it will > help me. > > Another thing : please dont post your benchmark figures without any > explanation on the work load generator or your cluster settings. It really > doesn't make any sense... > > > On Wed, May 5, 2010 at 6:16 PM, Weijun Li <weij### @gmail.com> wrote: > >> When you have much more data than you can hold in memory, it will be >> difficult for you to get around of swap which will most likely ruin your >> performance. Also in this case mmap doesn't seem to make much sense if you >> use random partitioner which will end up with crazy swap too. However we >> found a way to get around read/write performance issue by integrating >> memcached into Cassandra: in this case you need to ask memcached to disable >> disk swap so you can achieve move than 10k read+write with milli-second >> level of latency. Actually this is the only way that we figured out that can >> gracefully solve the performance and memory issue. >> >> -Weijun >> >> >> On Wed, May 5, 2010 at 8:19 AM, Ran Tavory <rant### @gmail.com> wrote: >> >>> I'm still trying to figure out where my slowness is coming from... >>> By now I'm pretty sure it's the reads are slow, but not sure how to >>> improve them. >>> >>> I'm looking at cfstats. Can you say if there are better configuration >>> options? So far I've used all default settings, except for: >>> >>> <Keyspace Name="outbrain_kvdb"> >>> <ColumnFamily CompareWith="BytesType" Name="KvImpressions" >>> KeysCached="50%"/> >>> >>> <ReplicaPlacementStrategy>org.apache.cassandra.locator.RackAwareStrategy</ReplicaPlacementStrategy> >>> <ReplicationFactor>2</ReplicationFactor> >>> >>> <EndPointSnitch>org.apache.cassandra.locator.EndPointSnitch</EndPointSnitch> >>> </Keyspace> >>> >>> >>> What does a good read latency look like? I was expecting 10ms, however >>> so far it seems that my KvImpressions read latency is 30ms and in the system >>> keyspace I have 800ms :( >>> I thought adding KeysCached="50%" would improve my situation but >>> unfortunately looks like the hitrate is about 0. I realize that's >>> application specific, but maybe there are other magic bullets... >>> >>> Is there something like adding cache to the system keyspace? 800 ms is >>> pretty bad, isn't it? >>> >>> See stats below and thanks. >>> >>> >>> Keyspace: outbrain_kvdb >>> Read Count: 651668 >>> Read Latency: 34.18622328547666 ms. >>> Write Count: 655542 >>> Write Latency: 0.041145092152752985 ms. >>> Pending Tasks: 0 >>> Column Family: KvImpressions >>> SSTable count: 13 >>> Space used (live): 23304548897 >>> Space used (total): 23304548897 >>> Memtable Columns Count: 895 >>> Memtable Data Size: 2108990 >>> Memtable Switch Count: 8 >>> Read Count: 468083 >>> Read Latency: 151.603 ms. >>> Write Count: 552566 >>> Write Latency: 0.023 ms. >>> Pending Tasks: 0 >>> Key cache capacity: 17398656 >>> Key cache size: 567967 >>> Key cache hit rate: 0.0 >>> Row cache: disabled >>> Compacted row minimum size: 269 >>> Compacted row maximum size: 54501 >>> Compacted row mean size: 933 >>> ... >>>
Tuning garbage collection
Hi, I'm using Tomcat 6.0.26, Java 1.6 and wondering what tools/strategies you use to tune your garbage collection parameters? Further, does anyone know how to read entries in the garbage collection log? Entries in my log look like Desired survivor size 10944512 bytes, new threshold 1 (max 15) [PSYoungGen: 129311K->3232K(136512K)] 558882K->434085K(585920K), 0.0090900 secs] Thanks, - Dave
Multi-byte DN with MS LDAPSDK and Apache
This is a multi-part message in MIME format.Quite some time ago, one of my colleagues started the following thread: http://marc.info/?l=apache-httpd-dev&...942300453&w=2 <http://marc.info/?l=apache-httpd-dev&...942300453&w=2> There was some discussion around the Windows utf-8 codepage and it's relationship to the local codepage. Here's Bill Rowe's comment on that: http://marc.info/?l=apache-httpd-dev&...046012720&w=2 <http://marc.info/?l=apache-httpd-dev&...046012720&w=2> I think I finally understand it, and at the same time I don't understand it :). I've been playing with this recently trying to get this to work, and I found that if I set the system locale to the same language as the UTF-8 encoded character in LDAP is from it works. Which makes sense. The code page for the system language contains a mapping for the UTF-8 character. I don't even pretend to understand Windows and/or encoding enough to truly get this limitation, but is it just some microsoft-ism that limits UTF-8 character mapping to the default code page? Does this mean that if you needed to support DNs with multiple languages that are not all included on a single Windows codepage (that's associated to a specific language locale) that this would not be possible on Windows? Am I even making sense? Thanks, Andy
DO NOT REPLY New: Apache mod_authnz_ldap built with the MS LDAPSDK does not handle multi-byte DNs
https://issues.apache.org/bugzilla/show_bug.cgi?id=49568
Summary: Apache mod_authnz_ldap built with the MS LDAPSDK does
not handle multi-byte DNs
Product: Apache httpd-2
Version: 2.2.15
Platform: PC
OS/Version: Windows Server 2003
Status: NEW
Severity: major
Priority: P2
Component: mod_authz_ldap
AssignedTo: bu### @httpd.apache.org
ReportedBy: dop### @moonteeth.com
Created an attachment (id=25729)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25729)
ldif file containing user that doesn't work. Password for the user is the
string: two
If a user's DN contains a multi-byte character, auth_ldap will not
authenticate
the user because the multi-byte characters returned by the searchRequest
will
be converted to ?'s when attempting to bind.
For example a user with the following dn:
cn=t[UTF-8: 0xE6 0x88 0x91], ou=people
UTF-8: 0xE6 0x88 0x91 is the utf-8 character for the chinese word for me.
Will not work because the bind request will be for
cn=t?,ou=people
See this mailing list thread with a discussion on this:
http://marc.info/?l=apache-httpd-dev&...942300453&w=2
Attached is an ldif file containing the dn I used.
svn commit: r951930 - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/catalina/core/ java/org/apache/ca
Author: kkolinko Date: Sun Jun 6 19:17:58 2010 New Revision: 951930 URL: http://svn.apache.org/viewvc?rev=951930&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48971 Make stopping of leaking Timer threads optional and disabled by default. It is merge of r950164, r950614 from trunk. Modified: tomcat/tc6.0.x/trunk/ (props changed) tomcat/tc6.0.x/trunk/STATUS.txt tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappLoader.java tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml tomcat/tc6.0.x/trunk/webapps/docs/config/context.xml Propchange: tomcat/tc6.0.x/trunk/
FW: problem with org.apache.catalina.core.ApplicationHttpRequest method.
Hi guys, sorry for the bother. I do have a question related to how a
certain feature was implemented in Tomcat (6.0, probably
all of them), that's why I address the question to the dev-list and the
user-list.
I do have a fairly complicated case, in which I have a filter for jsp's,
and I use a custom request wrapper in the respective filter.
My request wrapper overrides setAttribute and getAttribute (does some
internal management, not relying on the "super"),
and I had the surprise to see that the setAttribute from my wrapper
doesn't get called from the
org.apache.catalina.core.ApplicationHttpRequest setAttribute, at least not
for the "special attributes" (and I need the
javax.servlet.include attributes, which Tomcat considers "special").
The code that I find is problematic is copied underneath (the
if(!setSpecial) part), and the question is "why doesn't the
getRequest.setAttribute get called ALL THE TIME". The problem manifests
when I do a jsp:include, and when the
filter on the included jsp checks my wrapper, can't find the
javax.servlet.include.* attributes. This is somewhat bothering,
considering that I don't have this issue with Weblogic and Websphere, both
do call my wrapper's set/getAttribute...
p.s. the code I believe is at fault is:
org.apache.catalina.core.ApplicationHttpRequest
...
public void setAttribute(String name,
Object value)
{
if (name.equals(Globals.DISPATCHER_TYPE_ATTR)) {
dispatcherType = value;
return;
} else if (name.equals(Globals.DISPATCHER_REQUEST_PATH_ATTR)) {
requestDispatcherPath = value;
return;
}
if (!setSpecial(name, value)) {
getRequest().setAttribute(name, value);
}
}So, the questions are:
1. do you think is a big issue if I remove the "if" and I just use instead
to instructions -
- setSpecial(name, attribute);
- getRequest().setAttribute...
In my tests it seemed to work fine, but maybe I don't grasp all the
implications.
2. any particular reason for calling the getRequest().setAttribute only
for some (non-special) attributes, but not for others
(javax.servlet.include.*)?
thanks for any suggestion/
ranjix
Hotmail has tools for the New Busy. Search, chat and e-mail from your
inbox. Learn more.
org.apache.catalina.Core MBeans Descriptor Modifications
Hi All, It seems that o.a.Catalina.Core MBeans descriptor has got operations containing POJO objects instead of primitive types which make them inaccessible via JConsole. I suggest the following to avoid this situation. Any comments and suggestions are appreciated. *Class: StandardContext * ' Method : addValve (org.apache.catalina.Valve) Suggestion : Modify the signature to addValve(String className) where className is that of the Valve to be instantiated. This is acceptable since all the Valve classes have no arg constructors AFA I noticed. Method : removeValve(org.apache.catalina.Valve) Suggestion : Modify the signature to removeValve(String oname) Methods : add/removeLifecycleListener(org.apache.catalina.LifecycleListener) Suggestion : Remove the methods since the method can be provided in a generic way with only involving primitives. Any ideas on this? These methods can be included in a seperate MBean class (e.g:StandardContextMBean) so that original class interface is left intact. *Class: StandardEngine* Method : addChild(org.apache.catalina.Container) Suggestion : addHost(String name, String appBase, boolean autoDeploy,boolean deployOnStartup,boolean deployXML, boolean unpackWARs) This method can be included in a seperate MBean class so that original class interface is left intact. Since only a host can be added as a child mbean method name can be named as addHost to remove any ambiguity. *Class: StandardHost* Method : addChild(org.apache.catalina.Container) Suggestion : addContext(String path, String docBase, boolean xmlValidation, boolean xmlNamespaceAware, boolean tldValidation, boolean tldNamespaceAware) *Class: StandardService* Method : addConnector(org.apache.catalina.connector.Connector) Suggestion : addConnector(String address, int port, boolean isAjp, boolean isSSL) *Class: StandardWrapper* Method : add/removeLifeCycleListener(org.apache.catalina.LifecycleListener) Suggestion : Remove the methods since the method can be provided in a generic way with only involving primitives. Regards, Chamith
Apache 2.2 Tuning
Jun 23, 2010 mod_jk and tomcat virtual hosts not working properly Jul 26, 2010 Apache <Virtual Host> setting problem Jun 29, 2010 Multi element maths, which square root Jun 13, 2010 Creating a virtual host Jul 17, 2010 virtual host with .info domain Jun 30, 2010 Request for Help: Virtual Server: Domain-Einrichtung Jul 9, 2010 Reliable hosts in India? May 12, 2010 Apache 2.x config help May 25, 2010 Apache 2.2 with Tomcat 6 Jun 11, 2010 | |||||
(51 lines) Jun 29, 2010 04:35
(77 lines) Jun 29, 2010 10:32