Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

Streaming data via AJP causes OOME #1787

Closed
glassfishrobot opened this issue Jun 28, 2015 · 14 comments
Closed

Streaming data via AJP causes OOME #1787

glassfishrobot opened this issue Jun 28, 2015 · 14 comments

Comments

@glassfishrobot
Copy link

Streaming data via AJP without setting a Content-Length header results in the data accumulating in-memory resulting in an eventual OutOfMemoryError.

See payara/Payara#350 for detailed diagnostics and reproducer

Affected Versions

[2.3.19]

@glassfishrobot
Copy link
Author

Reported by payara_steve

@glassfishrobot
Copy link
Author

@rlubke said:
Thanks for raising this. I'll take a look this week.

@glassfishrobot
Copy link
Author

@rlubke said:
Able to reproduce. Investigating.

@glassfishrobot
Copy link
Author

@rlubke said:
Root cause is that the AjpHttpResponse implementation doesn't take chunking configuration into account at all, so that code path is disabled. This means that the response has to be buffered in order to provide a content-length.

I've made a quick change to the aforementioned mentioned class and it appears to have resolved the problem.

We can provide a drop-in replacement JAR for the Grizzly runtime within GlassFish for you to test/confirm with in your environment, but we'll need to know what version of GlassFish you're using.

@glassfishrobot
Copy link
Author

payara_steve said:
We are using Payara 4.1.152.1 which is based off GlassFish 4.1 but ships with Grizzly 2.3.19. I can test a patched Grizzly 2.3.19.

@glassfishrobot
Copy link
Author

@rlubke said:
Modified 2.3.19 AJP code to resolve chunking issue.

@glassfishrobot
Copy link
Author

File: grizzly-http-ajp-2.3.19.jar
Attached By: @rlubke

@glassfishrobot
Copy link
Author

@rlubke said:
I've attached a modified 2.3.19 AJP jar.

You should be able to replace the existing 2.3.19 jar in your local maven repo and re-build your custom GF server to pick the JAR up.

@glassfishrobot
Copy link
Author

payara_steve said:
Thanks I'll test the patch. Do you know which Grizzly release it will appear in if everything is OK?

BTW your repo synch to github seems to have stopped https://github.com/GrizzlyNIO/grizzly-mirror

@glassfishrobot
Copy link
Author

@rlubke said:
The next release version is 2.3.22. I'll have to check with the team regarding a release timeline.

As to the mirror, you're right. Thanks for pointing that out. We'll look into it.

@glassfishrobot
Copy link
Author

@rlubke said:
Unrelated to this issue, but the mirror issue is resolved.

@glassfishrobot
Copy link
Author

@rlubke said:
2.3.x: 6c08805
master: 102c432

@glassfishrobot
Copy link
Author

Marked as fixed on Tuesday, June 30th 2015, 9:34:42 am

@glassfishrobot
Copy link
Author

This issue was imported from java.net JIRA GRIZZLY-1787

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants