mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 11:47:26 -08:00
Run full GC periodically to try to fight memory issue with ImageIO objects with large offheap allocations (?)
This commit is contained in:
parent
7a5038a070
commit
0000a10272
|
@ -83,7 +83,7 @@ import javax.servlet.http.Part;
|
|||
@MultipartConfig(
|
||||
maxFileSize = 1L << 26, // ~64MB
|
||||
maxRequestSize = 1L << 26, // ~64MB
|
||||
fileSizeThreshold = 1 << 20, // ~1MB
|
||||
fileSizeThreshold = 1 << 23, // ~8MB
|
||||
location = "/tmp")
|
||||
@WebServlet(value = "/w/decode", loadOnStartup = 1)
|
||||
public final class DecodeServlet extends HttpServlet {
|
||||
|
|
|
@ -82,6 +82,13 @@ public final class DoSFilter implements Filter {
|
|||
bannedIPAddresses.clear();
|
||||
}
|
||||
}, 0L, TimeUnit.MILLISECONDS.convert(15, TimeUnit.MINUTES));
|
||||
timer.scheduleAtFixedRate(
|
||||
new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.gc();
|
||||
}
|
||||
}, 0L, TimeUnit.MILLISECONDS.convert(15, TimeUnit.MINUTES));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue