Welcome! Log In Create A New Profile

Advanced

Re: Apache Tomcat performance

All files from this thread

File Name File Size   Posted by Date  
smime.p7s 4.6 KB open | download Jérôme Balducci 01/03/2011 Read message
Jérôme Balducci
January 03, 2011 04:44AM
http://www.ruby-forum.com/topic/194600 may be useful.
Short answer is : build tomcat with apr native

Le 3 janv. 2011 à 02:36, mschipperheyn a écrit :

> Hi,
>
> I'm a newbie on Nginx and I became interested in it because Apache 2 is
> so wasteful with resources. However, Nginx seems a lot slower than
> Apache. It takes about 3 seconds to return a request even when I'm
> within the cache timeout period which surprises me.
>
> My test server is 512MB, Lucid Lynx with Apache Tomcat 6.0.24 and Nginx
> 0.7.65.
>
> I've set up an asset server configuration and an application server
> configuration.
>
> Any help's appreciated.
>
> server.xml
> [code]
>
> [/code]
>
> I also tried the Nio protocol with the same result.
> I used apt-get install libtcnative-1 (1.1.19) to install the APR support
> for Tomcat and I can see that the native libraries are being loaded
>
> default nginx
> [code]
> server {
> listen 80 default;
> server_name _;
> server_name_in_redirect off;
> charset utf-8;
> root /usr/shared/apache-tomcat-6.0.x/webapps/ROOT;
> add_header Cache-Control public;
>
> location /WEB-INF/ {
> deny all;
> }
> location ~ /\.ht {
> deny all;
> }
>
> location / {
> try_files $uri $uri/ @proxy;
> }
>
> location @proxy {
> proxy_pass http://localhost:8080;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_set_header Host $http_host;
> proxy_max_temp_file_size 0;
> proxy_buffering off;
> proxy_store off;
> proxy_connect_timeout 120;
> proxy_send_timeout 120;
> proxy_read_timeout 120;
>
> # All POST requests go directly
> if ($request_method = POST) {
> proxy_pass http://localhost:8080;
> break;
> }
> }
> }
> [/code]
> assets nginx
> [code]
> server {
> listen 80;
> server_name assets.mercadosa.com;
> root /usr/share/apache-tomcat-6.0.24/webapps/ROOT/assets;
>
> location / {
> rewrite ^/[^/]+(/.*) /$1;
> expires 90d;
> }
> }
> [/code]
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,162986,162986#msg-162986
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Attachments:
open | download - smime.p7s (4.6 KB)
Subject Author Posted

Apache Tomcat performance

mschipperheyn January 02, 2011 08:36PM

Re: Apache Tomcat performance Attachments

Jérôme Balducci January 03, 2011 04:44AM

Re: Apache Tomcat performance

mschipperheyn January 03, 2011 04:38PM

Re: Apache Tomcat performance

Weibin Yao January 03, 2011 09:42PM

Re: Apache Tomcat performance

Jérôme Balducci January 04, 2011 08:38AM

Re: Apache Tomcat performance

mschipperheyn January 08, 2011 06:24AM

Re: Apache Tomcat performance

mschipperheyn January 08, 2011 06:31AM

Re: Apache Tomcat performance

Weibin Yao January 09, 2011 09:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 300
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready