Dedicated server memory leak when changing map

I’m using Unreal 4.12.2, built from source, for my project. The project is a Blueprint project.

We are running a game that has a dedicated server executable running on our server. In order to reset the map where players connect to and play, the server executes console command open the_map to re-open the map and restore itself to the original state. It does this every 3 minutes.

However, I have noticed that doing so causes the RAM usage to grow very fast. I’ve seen it go over 4 GB, and I believe Windows has closed it for this reason.

My question:
Is there a better way to revert the map state to scratch? Should I be using the open level blueprint node instead of execute console command?
In the future, the server will be making a REST call when it first opens, so I would prefer a solution that allows this to be run, but if it is not possible, I’m amenable to other solutions to.

Thanks! :slight_smile:

Hi. So when you do open level/ open map, I believe it doesn’t destroy the game controllers that have been made?

The reset game method works well, it is basically open “mapname”.

I would try and make a method where you just reset variables, positions, etc, instead of trying to open the map/ level.

Hey narvalouspeter,

Thank you for the bug report. I was able to reproduce the issue and have logged it. You can track the progress of the issue here: https://issues.unrealengine.com/issue/UE-34423

Ok, thanks! That should be doable for us.