I am not familiar with Java application servers, so please excuse my ignorance.

Is it possible to schedule the garbage collection? If so, you could
temporarily disable the server, kick off GC, then re-enable the
server. HAProxy has a stats socket that would allow you to adjust the
server's weight to 0 temporarily. If you could make a JSP to kick off
GC, then you could have a simple cron job that uses socat to disable
the server, curl to hit that page, then socat to re-enable the server.
Do each server in turn (or on separate intervals). If you can do this
more often than it would happen "naturally" then you can control the
process and lose 0 requests.

Reply via email to