• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Allocation failed, server out of memory - Only Admin Character

Wilku93

Member
Joined
Jul 7, 2024
Messages
36
Reaction score
9
GitHub
Wilku93
Allocation failed, server out of memory.
Decrease the size of your map or compile in 64 bits mode.

TFS 1.4.2
System 8GB x64



Hello,

After the latest compilation, I encountered a strange issue, as shown in the attachments.

The weirdest part is that I can log into other accounts, and even Sample characters on the same account as the main admin, BUT I cannot log into the Admin character, as it crashes the server. Logging into the second admin on a different account works without any issues.

What’s even stranger is that the same files don’t cause any problems when I log into the admin character locally on my computer. In that case, the processor uses 2GB locally.

The only issue occurs when logging into the GOD character remotely.

acc.webp
acc1.webp
 
I cannot log into the Admin character, as it crashes the server. Logging into the second admin on a different account works without any issues.
Most obvious thing that may result in RAM going 100% is some invalid items structure in database.
You can try to remove player_items, player_depotitems and player_inbox items of GOD character and check, if it fixed anything.

Other possible reason is some bugged Lua script, but it can't be that simple. Lua has RAM limit of 2 GB and your server RAM usage grows from 2153 MB to 6044 MB. To make Lua script use that much RAM, but not store it all in Lua, there must be some script which create some object in C++ ex. Combat or spawn Monster on map (more like 100k Monsters, not 1).

To find real reason you would need C++ debugger, to check what function was C++ executing when it crashed.
IDK any Windows debugger (is it home PC or some VPS with Windows? do you have Visual Studio on that machine?).
On Linux you could use gdb.

To make Lua script use that much RAM, but not store it all in Lua, there must be some script which create some object in C++ ex. Combat or spawn Monster on map (more like 100k Monsters, not 1).
Example of script that would make OTS use GBs of RAM:
"create Combat with different damage for every level between 1 and logged player level"
With normal players it uses few KB/MB RAM, but when GOD with 1kk level logins, it tries to create 1kk Combat objects.
 
Last edited:
Back
Top