Wow! Neither 4000 nor 9000 rows inside a web are logical at all. I don't think any user is going to see all those rows!
Don't you prefer adding a data scroller like this?:
With this you only get from datasource the current page, and your web site will go much faster for sure.
thank you for your answer.
i already have a datascroller, and i display only 20 rows in the datatable as well.
it's just like everything is in cache and when the datatable is rerender with another data inside, the memory used is juste growing up. it's like the older data are still in cache.
if i display several times datatable that contains around 4000 rows, there is no problem. but when it comes to 6000,9000 there comes the memory problems.
i'm still looking for a solution.
problem solved !
the jvmargs were apply only to myeclipse and not to the jvm used by tomcat.
the jvm max memory was 64MB :)
I don't think assigning more memory solves your problem. It simply moves the treshold. Now it will go OOM later.
I have also been thinking about rich:dataTable with scroller. How are the records retrieved. From your problem it seems that they are all fetched in one query and hold in memory. Probably one needs to provide own datasource to the table that will retrieve only the requested records.
Maybe someone from Richfaces can explain?