简体   繁体   中英

Is there a way to make HTTP request/response not to linger around in Java heap with Jetty?

Jetty is used as a embedded servlet container running on Glassfish JEE server.

Capturing core dump shows HTTP Post request/response with entire header still lying around in the memory.

Is there a way to clear these requests/responses from the memory?

If you run just Jetty, and not Glassfish, you can provide your own ByteBufferPool that clears (sets to all 0) the ByteBuffer 's that are returned to the pool.

However you'll take a performance hit doing this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM