• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

C++ 3.2.0 x14.12 Canary hangs on boot [Solved]

Joriku

Working in the mines, need something?
Joined
Jul 16, 2016
Messages
1,175
Solutions
17
Reaction score
481
Location
Sweden
Hi,
( This worked for the current server, it now boots )
can't find any issues related to this. Currently investigating this but server hangs when booting with a database over 1.1k+ players.
Post automatically merged:

After a very long and deep investigation, I've found and fixed the issue of this.
1) Startup system, it has no control over handling item data over large set player bases. Causing too heavy boot loads, attempting to load all items at once.

2) I changed the way the data is handled and is now booting more than half the time than it did before, even with all original data.

Affected files:
C++ ( Source ) Files:
  • src/game/game.cpp
  • src/canary_server.cpp
  • src/database/databasemanager.cpp
  • src/map/house/house.cpp
  • src/config/config_enums.hpp
  • src/config/configmanager.cpp
  • src/database/database.cpp

Lua Script Files:
- data/scripts/lib/register_migrations.lua
( Disabled old convention script, not needed in our case )
- canary-main/data-otservbr-global/scripts/game_migrations/20231128213358_move_hireling_data_to_kv.lua.disabled

Configuration Files:
- config.lua

Also changed the argon2 hashing rate and threads allowed in config.lua
LUA:
memoryConst = "1<<20" -- Increased to 1MB for better performance with large datasets
temporaryConst= 2
parallelism = 8 -- Increased to 8 for better multi-core utilization ( Previous 2, much more power for large datasets )

I am debating if this is worthy of a pull request, it fixed the issues on this server with 1.1k+ players and is now running smoothly again.
But it will require a few eyes to review the changes made.

Changes has been attached to thread.
 

Attachments

Last edited:
Back
Top