sqlite-sync / SQLite-sync.com

AMPLI-SYNC is a framework for synchronizing data between a Sqlite database and an MS SQL/MySQL/Oracle/PostgreSQL database. With this framework your application can work completely offline (Airplane Mode), then perform an automated Bidirectional Synchronization when an internet connection becomes available.
https://ampliapps.com/sqlite-sync/
BSD 3-Clause "New" or "Revised" License
326 stars 82 forks source link

Recommended java memory settings #57

Open Wrathchild70 opened 3 years ago

Wrathchild70 commented 3 years ago

With an out-of-the box install of Java and Tomcat, the logs typically end up reporting: (Using SqliteSync-3.2.16)

javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.OutOfMemoryError: GC overhead limit exceeded

1) Is there any guidance and to-what and where a setting change to give the VM more memory can be made? 2) Would that need to scale depending on the number of users / tables synced etc, e.g. nnMB per X users? 3) Could there be something internally not freeing its memory such that this error is seen after a period of time, e.g. a few days?

tdziemidowicz commented 3 years ago

Try this settings: -Xms2g -Xmx4g -XX:MaxPermSize=256m -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF-8 -XX:HeapDumpPath=/working-dir/heap-dump/ -server It will create dump file when OO will happen