简体   繁体   中英

Disable Glassfish 4.1 connection keep-alive

How can the connection keep-alive be disabled for glassfish 4.1.

Meaning: clients connecting to my glassfish http port won't be allowed to keep their connections alive.

According to the migration manual, the configuration key for that changed from glassfish 3.0 to glassfish 4.0 but I can't figure out the new configuration.

I'm not sure why you want to do this, keep-alive is not enabled by default in Glassfish 4. Maybe you have something in front of it like Apache, which is adding the keep-alive header?

According to the Glassfish 4 Migration Guide , the element was moved from

server-config.http-service.keep-alive.timeout-in-seconds

to

server-config.network-config.protocols.protocol.http-listener-1.http.timeout-seconds

But changing this setting doesn't have any effect for me, I can't get Glassfish to send the keep-alive header, this would be very weird if you had the opposite problem.

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