----- Original Message ----- From: "Mladen Turk" <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <tomcat-dev@jakarta.apache.org>
Cc: "Bill Barker" <[EMAIL PROTECTED]>
Sent: Wednesday, May 18, 2005 11:44 PM
Subject: AJP/Java connector issues



Hi,

Just noticed a strange behavior in the Java part of the
JK dealing with large (over 8184 bytes) data transfers.

Since with 8192 bytes AJP packet size, the maximum
transferred size per each packet is 8184 bytes one
would expect that for 20000 bytes file the packets
would be in a form of:
1:8184,2:8184,3:3632 thus total of 20000 bytes.

But in fact the behavior is rely weird:
1:8184,2:8,3:8184,4:8,5:3616.

Instead only three, the five! packets are transferred.

Seems that algorithm is breaking 8192 bytes of data to
two packets (8184 and 8 bytes).

Bill,
Any idea how to solve this, because it's way too
inefficient.
What's makes the things even worse is that for each
packet Apache2 creates a transient bucket thus
rising the memory usage.


I see what this is now: The default Connector OutputBuffer size is 8K, so it's sending the output to JkInputStream in 8K chunks. JkInputStream sends all of the 8K to Apache in two chunks.


As a Coyote OutputBuffer, it's not really JkInputStream's job to do additional buffering. It's probably better to do response.setBufferSize(20000); so that the Connector will send the whole thing to JkInputStream as one chunk.


Regards, Mladen.

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






This message is intended only for the use of the person(s) listed above as the intended recipient(s), and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you may not read, copy, or distribute this message or any attachment. If you received this communication in error, please notify us immediately by e-mail and then delete all copies of this message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through 
the Internet is not secure. Do not send confidential or sensitive information, 
such as social security numbers, account numbers, personal identification 
numbers and passwords, to us via ordinary (unencrypted) e-mail.


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

Reply via email to