Hello,
We have questions regarding the pagesX.dat files in the temp directory.
We detected a problem on a machine with ‘only’ 2GB free memory on disc drive C:/ because during using our Product the %temp%/objectdb_123... folder growth up to 2GB. And then we run into some following errors due to lack of memory.
Some information to our scenario:
We use one main database file to which we continuously have a connection (open EntityManagerFactory). For each user action we create an EntityManager, begin a transaction, do some stuff (find, persist, remove …) and then commit or in the case of errors rollback the transaction and closing the EntityManager.
In some scenarios we use additional databases as large data sink. And for optimized data access we hold the connection to the EntityManager.
In the observed use case the database’s are very small (main DB ~ 3MB and three additional DB’s with just 1 MB)
If we access entities from one of the additional DB’s we get five new pagesX.dat files (each 8MB) in the TEMP directory. If we take a look into the dat files they are all (with exception of the first one) empty. Or rather pre filled with null.
We observed that the directory is cleaned up sporadic. But for us is the worst case very important. We need to know how big can be the directory.
- Is there a threshold?
- Is the threshold adjustable?
- Is it possible to reduce the initial size (actually 8MB)?
- What performance advantages bring these files? Is this possible/ advisable to disable?
- What could we do wrong?
- Is our scenario with multiple DBs the reason for this behavior?