In our app that just migrated to wicket 1.3.2 we got a lot of the following exceptions [0] and at the same time our app was running low on memory. Now I don't know which one caused what, but a jmap histogram showed something rather disturbing:
num #instances #bytes class name -------------------------------------- 1: 82067 1181214384 [B 2: 2757758 132372384 java.util.HashMap$Entry 3: 628473 111755944 [C 4: 515329 77012440 [Ljava.util.HashMap$Entry; 5: 28468 44637824 oracle.jdbc.driver.T4CPreparedStatement 6: 345808 40406568 [I 7: 576443 32280808 org.apache.wicket.markup.html.basic.Label 8: 440706 31538440 [Ljava.lang.Object; 9: 491169 31434816 java.util.HashMap 10: 144040 25626360 <constMethodKlass> The number 1 entry is what spooks me. they are 82k byte arrays, taking a whopping 1.2Gb of memory. A quick calculation shows that this means 14kb per byte[] on average. The only thing that comes to my mind is that this are serialized pages. Unfortuately I am unable to prove this, so we have to conduct a thought experiment. Is it possible that in this case the page's serialization data is not cleaned up, taking more and more memory? Martijn [0] java.lang.RuntimeException: java.io.FileNotFoundException: /work/vocus/vocus-filestore/3A167A6585AB5D8695AA85D1BBE4D133/pm-null (No such file or directory) at org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:104) at org.apache.wicket.protocol.http.pagestore.FileChannelPool.getFileChannel(FileChannelPool.java:171) at org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage(DiskPageStore.java:241) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList(DiskPageStore.java:889) at org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run(DiskPageStore.java:952) at java.lang.Thread.run(Thread.java:619) Caused by: java.io.FileNotFoundException: /work/vocus/vocus-filestore/3A167A6585AB5D8695AA85D1BBE4D133/pm-null (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212) at org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:99) ... 5 more