Loading...
Artemis Software blog

How to set up the Apache Portable Runtime for Tomcat - Confluence - JIRA

When I was looking through the Tomcat 6 logs I noticed this.

"catalina.2009-04-16.log:INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: "

After a bit of Googling came across this:

"Apache Portable Runtime to provide superior scalability, performance" for Tomcat 6.

There are comments that when using the APR Tomcat will server static content on par with Apache (httpd) server speeds - though I haven't been able to personally verify this just yet.

So that is extremely compelling. I'm still searching for some statistics on how much good the APR does and may try to create my own.

Here are some instructions on building / installing the APR: http://apr.apache.org/
(I actually used this page which was a bit easier to follow: http://www.mbaworld.com/docs/apr.html)

Basically the steps which got it working for me were:

  • download the APR source zip
  • build the source as per the instructions listed on the page above - if you have the privleges this installs the package to /usr/local/apr
  • Follow the steps here using
    After getting the APR to build/install as mentioned above this was the line the worked for me.
    ./configure --with-apr=/usr/local/apr --with-java-home=$JAVA_HOME && make && make install
  • the final trick to get it working for me was to copy the libs from /usr/local/apr/lib to one of the directories listed in the 'java.library.path' above - which will be different for each machine but Tomcat thankfully tells you where it's looking.

That's more of a high level list rather than individual steps, but those can be found

You can tell it's installed when you see this line in your log files - most likely in logs/catalina.out
Loaded APR based Apache Tomcat Native library 1.1.14

In this case the environment is:
JDK 1.6
Tomcat 6.0.18
Confluence 2.10.3
Mac OS 10.5 and a Linux Cent OS server (the notes above would vary a bit for Windows)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

Archives

April 2009
Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    

Oracle database - I have to do what? Are you kidding me?
Atlassian Summit around the corner!