superzanti / ServerSync

Sync files between client and server for Minecraft Forge
GNU General Public License v3.0
163 stars 26 forks source link

java.lang.OutOfMemoryError: Java heap space #190

Closed Krutoy242 closed 3 years ago

Krutoy242 commented 4 years ago

Serversync Version:

3.5.1

Minecraft Version:

1.12.2

Issue:

After actual sync, server starting to spam errors in console and log file. Sync still works but very slow (~15 minutes for whole syncing instead of 2 minutes as usual) This happens when i syncing 2+ times. Problem happens without arguments and with java -jar -Xms256m -Xmx2g serversync-3.5.1.jar server too

Console repeat messages:

Exception in thread "Log Saving" java.lang.OutOfMemoryError: Java heap space
Exception in thread "Log Saving" Exception in thread "Log Saving" java.lang.OutOfMemoryError: Java heap space

serversync-server-connection-from--192-168-193-234.log

Configs
Server list:

```
    S:DIRECTORY_INCLUDE_LIST <
        mods
        scripts
        config
        schematics
        resources
        resourcepacks
    >
```
Client:
```
    S:FILE_IGNORE_LIST <
        **/serversync-*.jar
        config/splash.properties
        config/creativecore-client.json
        config/InvTweaks.cfg
        config/MouseTweaks.cfg
        config/jei/worldSettings.cfg
        config/jei/lookupHistory.zip
        config/jei/bookmarks.ini
        config/BlockDrops/modVersions.txt
        config/InvTweaks/InvTweaks.cfg
        config/scavenge/IResourceProperty.txt
        config/AppliedEnergistics2/aerecipes/
        config/AppliedEnergistics2/recipes/
        config/AppliedEnergistics2/items.csv
        config/AppliedEnergistics2/VersionChecker.cfg
        config/AppliedEnergistics2/CustomRecipes.cfg
        config/brandon3055/ResourceCache/
        config/brandon3055/ProjectIntelligence/ModDocs/
        config/BlockDrops/blockdrops.txt
        config/armoryexpansion/traits.txt
        config/cd4017be/compiled.dat
        config/brandon3055/contributors.json
    >
```
Krutoy242 commented 4 years ago

Also, when syncing client and server process takes about ~4.5 Gb of RAM

rheimus commented 4 years ago

How large is the combined size of the directories being synced?

Feels like there is probably some leaking going on during the file IO

Krutoy242 commented 4 years ago

How large is the combined size of the directories being synced?

About 350 mb.

rheimus commented 3 years ago

Closing this as v4 has had significant changes in IO, feel free to reopen if the issue persists