Re: Dynamic DNS

2003-12-15 Thread Adam Fisk
You should be able to get your real ip address from your router 
configuration app.  You can get your private subnet address from the 
command line (ipconfig /all on Windows, ip addr on most Linux 
distributions, or similar commands).  Then you need to forward incoming 
requests on port 8080 or whatever port you're using now on your router 
to the listening port on your machine running the server.  You're 
probably already doing all that, but I just thought I'd be explicit.

Some dynamic DNS services also have utilities for reporting your real 
address, although your router should tell you.

-adam

webmaster wrote:

Thanks, Martin, but I think the problem is that there is a subnet on a 
wireless router that makes the true ip address of the tomcat running on 
this machine immediately unavailable.  What I have to do is to find out 
how to find the real ip address.  Getting one from a request object sent 
to a foreign computer does not seem to work, as that seems to be an 
alias from the isp that hides the true ip address as well.  Why the true 
ip address is hidden by the isp is not clear.  Any ideas?

At 09:26 AM 12/15/2003, you wrote:

//check $TOMCAT_HOME/conf/server.xml

!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 --

Connector className=org.apache.coyote.tomcat4.CoyoteConnector

port=8080 minProcessors=5 maxProcessors=75

enableLookups=true redirectPort=8443

acceptCount=100 debug=0 connectionTimeout=2

useURIValidationHack=false disableUploadTimeout=true /

Regards,
Martin
- Original Message -
From: webmaster [EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]
Sent: Monday, December 15, 2003 2:05 AM
Subject: Re: Dynamic DNS
 Thanks for the response.  I am going to dev because I thought and still
 think a bit that it might be a dev issue.  I have tried 8080 without
 success.  I have created a browser (URLConnection send on port 80 and
 8080) within Tomcat which can talk via a port 80 or port 8080 http
 connection with another tomcat with a dynamic dns.  But, trying it with
 another real browser it does not work.

 At 09:24 PM 12/14/2003, you wrote:
 This question is probably better asked on the users list.
 
   I am trying to use my home computer for development and need to 
access
a
   running web server on the computer.  However, for some reason I 
cannot
   access Tomcat using a http://[dynamic ip address] like.
 
 Are you running Tomcat on port 80? Many consumer cable/DSL providers
block
 port 80 on their residential IP blocks because of Code Red, Nimda c.s.
Try
 running the httpd adaptor of Tomcat on a different port.
 
 S.
 
 --
 [EMAIL PROTECTED]  http://www.temme.net/sander/
 PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 LEGAL NOTICE

 This electronic mail  transmission and any accompanying documents 
contain
 information belonging to the sender which may be confidential and 
legally
 privileged.  This information is intended only for the use of the
 individual or entity to whom this electronic mail transmission was 
sent as
 indicated above. If you are not the intended recipient, any disclosure,
 copying, distribution, or action taken in reliance on the contents 
of the
 information contained in this transmission is strictly prohibited.  
If you
 have received this transmission in error, please delete the message.
Thank
 you



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




LEGAL NOTICE

This electronic mail  transmission and any accompanying documents 
contain information belonging to the sender which may be confidential 
and legally privileged.  This information is intended only for the use 
of the individual or entity to whom this electronic mail transmission 
was sent as indicated above. If you are not the intended recipient, any 
disclosure, copying, distribution, or action taken in reliance on the 
contents of the information contained in this transmission is strictly 
prohibited.  If you have received this transmission in error, please 
delete the message.  Thank you 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Dynamic DNS

2003-12-15 Thread Adam Fisk
Hi Michael-

Given that this is wandering into areas not quite related to Tomcat, we 
should probably continue this discussion off list.  Feel free to e-mail 
me directly at afiskatspeedymaildotorg (insert @ for at and . for 
dot).  You basically need to tell dynamic dns the external IP of your 
modem and have your router forward traffic for you.

Best,

Adam

webmaster wrote:

Hello, Adam,

Given all the information you get from ipconfig /all, how do you tell 
what the ip address is that can be used to have a foreign host contact a 
server on a wireless laptop?  I have a hunch this is not the right 
question.  Apparently the isp uses the physical addresses in the subnet 
to route response information from servers to browsers on their 
network.  Is that right?  Mainly, I want to be able to test my Tomcat 
server running on my laptop from a foreign client at another location.  
The laptop is running a wireless connection to a router from a cable 
connection with my isp.  None of the ip addresses supplied by ipconfig 
/all work for that purpose.  If I get the ip address that my browser 
gives to a foreign server and resolve that to a host name, it is a 
series of hexidecimal numbers (12 of them)followed by a dot and the isp 
URL, e.g. 000d88870c4e.isp_name.com.  What does it all mean?

Michael McGrady

At 08:17 AM 12/15/2003, you wrote:

You should be able to get your real ip address from your router 
configuration app.  You can get your private subnet address from the 
command line (ipconfig /all on Windows, ip addr on most Linux 
distributions, or similar commands).  Then you need to forward 
incoming requests on port 8080 or whatever port you're using now on 
your router to the listening port on your machine running the server.  
You're probably already doing all that, but I just thought I'd be 
explicit.

Some dynamic DNS services also have utilities for reporting your real 
address, although your router should tell you.

-adam

webmaster wrote:

Thanks, Martin, but I think the problem is that there is a subnet on 
a wireless router that makes the true ip address of the tomcat 
running on this machine immediately unavailable.  What I have to do 
is to find out how to find the real ip address.  Getting one from a 
request object sent to a foreign computer does not seem to work, as 
that seems to be an alias from the isp that hides the true ip address 
as well.  Why the true ip address is hidden by the isp is not clear.  
Any ideas?
At 09:26 AM 12/15/2003, you wrote:

//check $TOMCAT_HOME/conf/server.xml

!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 --

Connector className=org.apache.coyote.tomcat4.CoyoteConnector

port=8080 minProcessors=5 maxProcessors=75

enableLookups=true redirectPort=8443

acceptCount=100 debug=0 connectionTimeout=2

useURIValidationHack=false disableUploadTimeout=true /

Regards,
Martin
- Original Message -
From: webmaster [EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]
Sent: Monday, December 15, 2003 2:05 AM
Subject: Re: Dynamic DNS
 Thanks for the response.  I am going to dev because I thought and 
still
 think a bit that it might be a dev issue.  I have tried 8080 without
 success.  I have created a browser (URLConnection send on port 
80 and
 8080) within Tomcat which can talk via a port 80 or port 8080 http
 connection with another tomcat with a dynamic dns.  But, trying it 
with
 another real browser it does not work.

 At 09:24 PM 12/14/2003, you wrote:
 This question is probably better asked on the users list.
 
   I am trying to use my home computer for development and need 
to access
a
   running web server on the computer.  However, for some reason 
I cannot
   access Tomcat using a http://[dynamic ip address] like.
 
 Are you running Tomcat on port 80? Many consumer cable/DSL providers
block
 port 80 on their residential IP blocks because of Code Red, Nimda 
c.s.
Try
 running the httpd adaptor of Tomcat on a different port.
 
 S.
 
 --
 [EMAIL PROTECTED]  http://www.temme.net/sander/
 PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
 
 
 
-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 LEGAL NOTICE

 This electronic mail  transmission and any accompanying documents 
contain
 information belonging to the sender which may be confidential and 
legally
 privileged.  This information is intended only for the use of the
 individual or entity to whom this electronic mail transmission was 
sent as
 indicated above. If you are not the intended recipient, any 
disclosure,
 copying, distribution, or action taken in reliance on the contents 
of the
 information contained in this transmission is strictly prohibited.
If you
 have received this transmission in error, please delete the message.
Thank
 you



 -
 To unsubscribe, e-mail: 

Re: 5.next + 4.1.x future

2003-12-12 Thread Adam Fisk
Just to chime in on the NIO issue, I agree that it's not immediately 
obvious what the performance benefits are.  Perhaps more importantly, 
though, the code changes to switch Tomcat (or any other good-size app) 
to NIO are tremendous -- basically a rewrite of the hard parts.

That said, I've done simple tests of NIO vs. blocking IO on Windows 
using simple blocking and non-blocking servers with variable numbers of 
client connections (from 100 to 10,000).  At least on Windows, the 
performance benefits come down to memory allocated to threads.  My 
blocking server used one send thread and one receive thread per 
connection (no thread pooling).  Given the memory allocations per 
thread, though, the blocking server with 1600 connections used 137MB 
whereas the NIO server used 11MB, almost exactly the same as the memory 
use with 50 connections.

I'd be happy to send my data to the group if people are interested. 
Aside from memory, I was surprised to find that the effect on CPU was 
negligible (not much of a benefit from no context-switching between 
threads) -- CPU was virtually the same in both cases.  So, the scaling 
benefits on Windows basically come from not having to allocate more 
memory to new threads.  I'm unfortunately not as familiar with the 
Tomcat code as I'd like to be, but I assume it makes intelligent use of 
thread pooling, which may even the memory benefits of NIO negligible. 
At the same time, though, NIO may remove some of the constraints 
introduced by thread pooling, possibly allowing Tomcat to handle heavier 
loads without blowing up.  An optimized NIO server would if anything 
out-perform a blocking server, but maybe by not that much.

-Adam

Remy Maucherat wrote:

Jan-Henrik Haukeland wrote:

Remy Maucherat [EMAIL PROTECTED] writes:

My opinion is that NIO is going to be really useless.


Eh, hello!? Oh, okay if it's not important that Tomcat scale and
perform well it may be useless. But, really, before NIO it was
hopeless to try and write a scalable and fast tcp server application
in Java. Tomcat's current connection handling with blocing all over
the place and thundering herd problem doesn't scale or work very
well under heavy load.


You apparently have a very strong opinion on this, and that's fine. You 
also obviously don't know what you are talking about. The purpose of 
Tomcat is to make the web tier of an application server (Tomcat is 
actually a mini application server), not some kind of non blocking I/O 
toolkit to be used to build fixed function servers. Non blocking I/O has 
great applications, and is a very useful technology, but it does not 
apply to the application server world.

I think you should find a servlet container which has NIO, compare with 
Tomcat 5.0.16, and come back to report your findings about how much 
scalability or speed NIO brings (note: doing the non blocking socket 
handling in a native layer doesn't really count, since it's not a fair 
comparison with Java's NIO; you might as well use Apache).

Bring facts, not useless rants.

Rémy



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: 5.next + 4.1.x future

2003-12-12 Thread Adam Fisk
Here's my excel spreadsheet.  All of these numbers are taken from the 
Windows Task Manager.  This is somewhat misleading in that the memory 
numbers don't properly reflect garbage collection, but it's informative 
nevertheless.

The Sends (ms) column reflects the timeout between client sends.  I 
originally intended to run these tests for many timeouts, but this 
became prohibitively annoying over the WAN.  These tests were done with 
all clients running on a single machine connecting to the servers over 
the WAN.

Thanks.

-Adam

Jeanfrancois Arcand wrote:



Adam Fisk wrote:

Just to chime in on the NIO issue, I agree that it's not immediately 
obvious what the performance benefits are.  Perhaps more importantly, 
though, the code changes to switch Tomcat (or any other good-size app) 
to NIO are tremendous -- basically a rewrite of the hard parts.

That said, I've done simple tests of NIO vs. blocking IO on Windows 
using simple blocking and non-blocking servers with variable numbers 
of client connections (from 100 to 10,000).  At least on Windows, the 
performance benefits come down to memory allocated to threads.  My 
blocking server used one send thread and one receive thread per 
connection (no thread pooling).  Given the memory allocations per 
thread, though, the blocking server with 1600 connections used 137MB 
whereas the NIO server used 11MB, almost exactly the same as the 
memory use with 50 connections.

I'd be happy to send my data to the group if people are interested. 


Yes, I will be very interested to see those numbers.

Thanks,

-- Jeanfrancois


Aside from memory, I was surprised to find that the effect on CPU was 
negligible (not much of a benefit from no context-switching between 
threads) -- CPU was virtually the same in both cases.  So, the scaling 
benefits on Windows basically come from not having to allocate more 
memory to new threads.  I'm unfortunately not as familiar with the 
Tomcat code as I'd like to be, but I assume it makes intelligent use 
of thread pooling, which may even the memory benefits of NIO 
negligible. At the same time, though, NIO may remove some of the 
constraints introduced by thread pooling, possibly allowing Tomcat to 
handle heavier loads without blowing up.  An optimized NIO server 
would if anything out-perform a blocking server, but maybe by not that 
much.

-Adam

Remy Maucherat wrote:

Jan-Henrik Haukeland wrote:

Remy Maucherat [EMAIL PROTECTED] writes:

My opinion is that NIO is going to be really useless.




Eh, hello!? Oh, okay if it's not important that Tomcat scale and
perform well it may be useless. But, really, before NIO it was
hopeless to try and write a scalable and fast tcp server application
in Java. Tomcat's current connection handling with blocing all over
the place and thundering herd problem doesn't scale or work very
well under heavy load.




You apparently have a very strong opinion on this, and that's fine. 
You also obviously don't know what you are talking about. The purpose 
of Tomcat is to make the web tier of an application server (Tomcat is 
actually a mini application server), not some kind of non blocking 
I/O toolkit to be used to build fixed function servers. Non blocking 
I/O has great applications, and is a very useful technology, but it 
does not apply to the application server world.

I think you should find a servlet container which has NIO, compare 
with Tomcat 5.0.16, and come back to report your findings about how 
much scalability or speed NIO brings (note: doing the non blocking 
socket handling in a native layer doesn't really count, since it's 
not a fair comparison with Java's NIO; you might as well use Apache).

Bring facts, not useless rants.

Rémy



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
.



blocking_vs_non-blocking.xls
Description: MS-Excel spreadsheet
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: 5.next + 4.1.x future

2003-12-12 Thread Adam Fisk
I should also mention that I ran these tests on an Athlon 2200 with 
512MB RAM.

-Adam

Adam Fisk wrote:

Here's my excel spreadsheet.  All of these numbers are taken from the 
Windows Task Manager.  This is somewhat misleading in that the memory 
numbers don't properly reflect garbage collection, but it's informative 
nevertheless.

The Sends (ms) column reflects the timeout between client sends.  I 
originally intended to run these tests for many timeouts, but this 
became prohibitively annoying over the WAN.  These tests were done with 
all clients running on a single machine connecting to the servers over 
the WAN.

Thanks.

-Adam

Jeanfrancois Arcand wrote:



Adam Fisk wrote:

Just to chime in on the NIO issue, I agree that it's not immediately 
obvious what the performance benefits are.  Perhaps more importantly, 
though, the code changes to switch Tomcat (or any other good-size 
app) to NIO are tremendous -- basically a rewrite of the hard parts.

That said, I've done simple tests of NIO vs. blocking IO on Windows 
using simple blocking and non-blocking servers with variable numbers 
of client connections (from 100 to 10,000).  At least on Windows, the 
performance benefits come down to memory allocated to threads.  My 
blocking server used one send thread and one receive thread per 
connection (no thread pooling).  Given the memory allocations per 
thread, though, the blocking server with 1600 connections used 137MB 
whereas the NIO server used 11MB, almost exactly the same as the 
memory use with 50 connections.

I'd be happy to send my data to the group if people are interested. 


Yes, I will be very interested to see those numbers.

Thanks,

-- Jeanfrancois


Aside from memory, I was surprised to find that the effect on CPU was 
negligible (not much of a benefit from no context-switching between 
threads) -- CPU was virtually the same in both cases.  So, the 
scaling benefits on Windows basically come from not having to 
allocate more memory to new threads.  I'm unfortunately not as 
familiar with the Tomcat code as I'd like to be, but I assume it 
makes intelligent use of thread pooling, which may even the memory 
benefits of NIO negligible. At the same time, though, NIO may remove 
some of the constraints introduced by thread pooling, possibly 
allowing Tomcat to handle heavier loads without blowing up.  An 
optimized NIO server would if anything out-perform a blocking server, 
but maybe by not that much.

-Adam

Remy Maucherat wrote:

Jan-Henrik Haukeland wrote:

Remy Maucherat [EMAIL PROTECTED] writes:

My opinion is that NIO is going to be really useless.




Eh, hello!? Oh, okay if it's not important that Tomcat scale and
perform well it may be useless. But, really, before NIO it was
hopeless to try and write a scalable and fast tcp server application
in Java. Tomcat's current connection handling with blocing all over
the place and thundering herd problem doesn't scale or work very
well under heavy load.




You apparently have a very strong opinion on this, and that's fine. 
You also obviously don't know what you are talking about. The 
purpose of Tomcat is to make the web tier of an application server 
(Tomcat is actually a mini application server), not some kind of non 
blocking I/O toolkit to be used to build fixed function servers. Non 
blocking I/O has great applications, and is a very useful 
technology, but it does not apply to the application server world.

I think you should find a servlet container which has NIO, compare 
with Tomcat 5.0.16, and come back to report your findings about how 
much scalability or speed NIO brings (note: doing the non blocking 
socket handling in a native layer doesn't really count, since it's 
not a fair comparison with Java's NIO; you might as well use Apache).

Bring facts, not useless rants.

Rémy



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Any clue on this, please? Uploading large files - out of memory

2003-12-03 Thread Adam Fisk
I've heard mention on this list many times of these OutOfMemoryErrors 
not being bugs.  I work on a Java app that experiences very high network 
traffic load, however, and it's been my experience that 
OutOfMemoryErrors are, in fact, always bugs regardless of how tempting 
it is to chalk it up to something else.

What makes everyone so certain it's not a bug or multiple bugs?  Since 
you don't get stack traces and at best can pin down the thread name for 
OutOfMemoryErrors, they take a lot of time to track down.  In my 
experience, though, they tend to result from an unaccounted for 
degenerate request coming that causes the code to, well, consume all the 
available memory (i.e., a bug).

-Adam

Shapira, Yoav wrote:

Howdy,
This belongs on the user, not dev, list.  It's most likely a simple
issue (not a bug) with you not allocating enough memory to the JVM.
Please pursue this issue on the user list.
Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Fabrizio Nesti [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 1:35 PM
To: [EMAIL PROTECTED]
Subject: Any clue on this, please? Uploading large files - out of
memory

Hi,
any comment on this out of memory with large file upload?
This error seems recurring to a bunch of users, but I'm wondering if
it's a

problem in the tomcat implementation, or if there are other layers to
blame.
Thanks for any light on this darkness, since I've a tight schedule on
this issue... unfortunately..
cheers,
fabrizio
-- Forwarded message --
Date: Mon, 1 Dec 2003 14:36:57 +0100 (MET)
From: Fabrizio Nesti [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Uploading large files - out of memory exception
Dear tomcat developers,

I've noticed a problem while uploading files with tomcat 4.1.x.

- When uploading large files (say larger than 10MB) tomcat throws an
out

of memory exception.

- The problem can be avoided raising the memory allocation (as found in
other similar messages, -Xms128m -Xmx512m) but this is not a
solution,

since it depends on the memory and just makes the limit higher.

I do not know how the actual download works (we are using the
EchoPoint fileupload component, for that matters) but it seems that
the whole file is slurped in memory _before_ passing the request to a
user servlet. Indeed it seems that our download component is never
invoked (see the error below).
Is there a configuration option to avoid this behavior, or there's
nothing to do but limit the filesize?
Thanks in advance for any clue and
cheers,
Fabrizio
PS: The error:

...
description The server encountered an internal error (Internal Server
Error)
that prevented it from fulfilling this request.
exception

javax.servlet.ServletException: Servlet execution threw an exception
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
atio

nFilterChain.java:269)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terC

hain.java:193)
  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.j

ava:256)
  at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo

keNext(StandardPipeline.java:643)
  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)

  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.j

ava:191)
  at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo

keNext(StandardPipeline.java:643)
  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)

  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:24
17)

  at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:18

0)
  at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo

keNext(StandardPipeline.java:643)
  at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV
alve

.java:171)
  at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo

keNext(StandardPipeline.java:641)
  at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:17

2)
  at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo

keNext(StandardPipeline.java:641)
  at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:57
7)

  at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo

keNext(StandardPipeline.java:641)
  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)

  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.jav

a:174)
  at

Re: Any clue on this, please? Uploading large files - out of memory

2003-12-03 Thread Adam Fisk
I unfortunately don't have the time to step through each and every 
thread where these errors are occuring, although I wish I did.  The 
question is, has someone done this?  It's about the most tedious coding 
process I know of, so it just wouldn't surprise me if no one's actually 
done it.  Do you know what threads these errors occur in?  If so, do you 
know when they occur?  Can you reproduce them?

Clearly there are legitimate OOMEs, there just much rarer than the 
illegitimate ones.  It's the legitimacy or illegitimacy that's tough to 
determine.  I'm sure this process has happened, but then again, maybe not.

-Adam

Shapira, Yoav wrote:

Howdy,
I would throw out one more piece of advice: consider jakarta commons
fileupload component.  It is well-designed with respect to handling
large files.
As to the OutOfMemoryErrors are, in fact, always bugs claim -- well,
that's the most amusing thing I've heard today ;)  If they are bugs,
find the buggy code.
Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Fabrizio Nesti [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 2:01 PM
To: Tomcat Developers List
Subject: Re: Any clue on this, please? Uploading large files - out of
memory
Indeed I am not 100% sure of the real cause of the OOME below.
However, as far as my request is concerned, it seems that the upload
component that we use (Echopoint's one, quite cool) _could_ (and
should)

have used an InputStream.

So this is enough for me to go bother them and no longer the tomcat-dev
:).

I was thinking that tomcat was the critical point, so I wrote here just
to

be sure.

In case you need further testing please let me know, for the rest it's
up

to
you tomcat developers... and... thanks for your good work.
cheers,
Fabrizio
On Wed, 3 Dec 2003, Adam Fisk wrote:


I've heard mention on this list many times of these OutOfMemoryErrors
not being bugs.  I work on a Java app that experiences very high
network

traffic load, however, and it's been my experience that
OutOfMemoryErrors are, in fact, always bugs regardless of how
tempting

it is to chalk it up to something else.

What makes everyone so certain it's not a bug or multiple bugs?
Since

you don't get stack traces and at best can pin down the thread name
for

OutOfMemoryErrors, they take a lot of time to track down.  In my
experience, though, they tend to result from an unaccounted for
degenerate request coming that causes the code to, well, consume all
the

available memory (i.e., a bug).

-Adam

Shapira, Yoav wrote:


Howdy,
This belongs on the user, not dev, list.  It's most likely a simple
issue (not a bug) with you not allocating enough memory to the JVM.
Please pursue this issue on the user list.
Yoav Shapira
Millennium ChemInformatics



-Original Message-
From: Fabrizio Nesti [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 1:35 PM
To: [EMAIL PROTECTED]
Subject: Any clue on this, please? Uploading large files - out of
memory


Hi,
any comment on this out of memory with large file upload?
This error seems recurring to a bunch of users, but I'm wondering
if

it's a


problem in the tomcat implementation, or if there are other layers
to

blame.

Thanks for any light on this darkness, since I've a tight schedule
on

this issue... unfortunately..
cheers,
fabrizio
-- Forwarded message --
Date: Mon, 1 Dec 2003 14:36:57 +0100 (MET)
From: Fabrizio Nesti [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Uploading large files - out of memory exception
Dear tomcat developers,

I've noticed a problem while uploading files with tomcat 4.1.x.

- When uploading large files (say larger than 10MB) tomcat throws
an

out


of memory exception.

- The problem can be avoided raising the memory allocation (as
found in

other similar messages, -Xms128m -Xmx512m) but this is not a
solution,


since it depends on the memory and just makes the limit higher.

I do not know how the actual download works (we are using the
EchoPoint fileupload component, for that matters) but it seems that
the whole file is slurped in memory _before_ passing the request to
a

user servlet. Indeed it seems that our download component is never
invoked (see the error below).
Is there a configuration option to avoid this behavior, or there's
nothing to do but limit the filesize?
Thanks in advance for any clue and
cheers,
Fabrizio
PS: The error:

...
description The server encountered an internal error (Internal
Server

Error)
that prevented it from fulfilling this request.
exception

javax.servlet.ServletException: Servlet execution threw an
exception

 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
c

atio


nFilterChain.java:269)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
l

terC


hain.java:193)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
l

ve.j


ava:256)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext

Re: custom HTTP headers?

2003-07-01 Thread Adam Fisk
Fantastic -- thanks very much.

-adam

-- Original Message --
From: Tim Funk [EMAIL PROTECTED]
Reply-To: Tomcat Developers List [EMAIL PROTECTED]
Date: Mon, 30 Jun 2003 19:58:21 -0400

HttpServletResponse which is part of the servlet API (and portable to other 
containers)

-Tim

Adam Fisk wrote:
 I'm wondering if anyone can point me towards the class/classes that I 
 should look at to add custom HTTP response headers for a customized 
 Tomcat application I'm working on.
 
 Thanks very much.
 
 -Adam
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



custom HTTP headers?

2003-06-30 Thread Adam Fisk
I'm wondering if anyone can point me towards the class/classes that I 
should look at to add custom HTTP response headers for a customized 
Tomcat application I'm working on.

Thanks very much.

-Adam

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]