Issue Details (XML | Word | Printable)

Key: GLASSFISH-20677
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Daniel
Reporter: psytester
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.

large HTTP GET request will cause java.nio.BufferOverflowException while writing into AccessLog

Created: 02/Jul/13 01:30 PM   Updated: 05/Jul/13 09:23 AM
Component/s: web_container
Affects Version/s: v2.1.1
Fix Version/s: None

Time Tracking:
Not Specified


Sun Glassfish Enterprise Server v2.1.1 Patch19 on Solaris 5.10 x86 based system

Participants: Daniel, psytester and Shing Wai Chan

 Description  « Hide

We want to write our HTTP operations into a logfile via the AccessLog configuration.
In GF server.log we catched a BufferOverflowException and while analysing the problem and playing with the configuration of AccessLog-Writer we think that the code has a bug.

1. step
Our domain.xml does not contain in virtual-server section the property name="accessLogBufferSize", thus any default value should be taken, but what is the default value?

2. step
We added the configuration
<virtual-server hosts=[....] http-listeners="http-listener-1,http-listener-2" id="server" ...>
property name="accessLogBufferSize" value="32768"/>

and the BufferOverflowException did not longer appear. ....for the first time!
But if we generate enough traffic to get full the buffer to be flushed within the timer interval we can get again the BufferOverflowException.

3. step
We tried to use as work around the parameter accessLogWriterInterval=0 to bypass the interval timer, but it leads into same BufferOverflowException.

How the server_access_log file looks like:
We have one very large HTTP-GET which will create a log file entry with more than 5400 bytes and another one with more than 9500 bytes.
After those large HTTP-GET requests there are some small HTTP-POST with just around 113 bytes each line.

I think the problem can be located in that way that the buffer is filled over the time and in case the buffer is not yet flushed and a new HTTP operation will fill the buffer, we get finally that BufferOverflowException.

The AccessLog file will contain cutted HTTP-GET lines only up to the point where the Excetion is thrown.