Howdy everybody,
I’m at present operating a recreation server (much like Metin/mmo type) on a devoted server from Hetzner.
It ran superb for about 1 month with a mean of 25 gamers on-line.
Just lately, extra gamers have joined (45-50 in whole now) and I preserve getting crashes (deadly error : concurrent map learn and write).
These didn’t occur with a smaller participant base, I’ve added sync.RWmutexes and all that within the code and I nonetheless get random crashes.
The setting is extremely concurrent.
I’m operating :
- ryzen 7 7700
- 64 gb ram
- 512 gb nvme
- 1gb/s bandwidth
The CPU is all the time below 20%.
Ought to I improve it?
Thanks
What’s the precise panic? Are you able to recuperate/get a stack hint? It is best to for positive attempt to troubleshoot the error. This can be very unlikely that extra {hardware} would repair a concurrency drawback. Right here’s a related Stack Overflow query:
You may attempt a sync.Map
(relying in your use case):
Additionally have you ever used the race detector?
1 Like
Signifies that some map reads and writes are usually not guarded by a mutex.
You might need to attempt changing the map with the up to date concurrent map in 1.24rc2 or examine your whole map entry and make sure that it’s guarded with a rw mutex.