biell / alti-server

Altitude game server wrapper
The Unlicense
13 stars 3 forks source link

[Error] Space reserved for maps: -612 #19

Closed kevATin closed 4 years ago

kevATin commented 4 years ago

I've had trouble with this before to varying degrees, and decided to put up reporting the error until later. But now I can't seem to get the server to run at all with my current setup. I might be able to narrow the issue down if I test more, but right now I'm pretty blank. Obviously with a negative map space all maps are getting "Excluded map due to packet size constraint: mapname" and then it complains about "Error: no maps found during startup"... And no, it isn't always -612, this number varies a bit (right now at least, can't remember the numbers I got weeks ago). Right now the only maps in my map folder are: tbd_core, ffa_trainingmayhem, ffa_channelpark, ball_powder, ball_gliderpark (the one I'm using); and when I tested around a few weeks ago I only tried using about 26 or so maps, yet it only let through a few of them due to space. I have no idea how this map space is determined, or why some maps are allowed in at some times.

biell commented 4 years ago

it seems weird that you would see this with the xx extensions enabled. Can you check with /server list xxEnabled for me? Have you created a whole bunch of custom commands or set the number of allowed users really high?

The server sends out a configuration packet, and it needs to include space each user's UUID, all custom server commands, and all the maps. If you have xxEnabled set, then I will automatically take advantage of Xal's config_size_workaround, but that only moves the maps out to their own config packet, you still use space for the users and custom commands. You could also try setting /server set configSize small and see if that buys you the space you need.

If this doesn't make sense as to what is using up all the space in the config packet, you may have to send me your config files, so I can take a look at them.

kevATin commented 4 years ago

Ah no xx wasn't enabled for that one; these were set up completely from scratch and are unrelated to what I was playing around with earlier. But I did indeed set player slots to 64. Tested around some more today; since the server didn't finish starting I couldn't run /server list/set xxEnabled or anything (couldve edited alti+server directly i guess), anyways I ended up setting up a fresh alti copy with 14 slots, set everything up, enabled xx, set slots to 64, and now I've got 4k something map space if i remember correctly. so that should be fine~ I now got a new server template with xxEnabled and the game jar replaced with the patched one (so I don't need to bother with that linked file when I shuffle folders), so I won't forget to enable xx again~ That said, I can't say for sure whether the issue may or may not have existed in some of my xx enabled setups from earlier. I'll keep an eye on that. So the maximum allowed size of that configuration packet that the client will accept is the limiting factor? I see.

biell commented 4 years ago

Ah, yes, that makes sense. All packets in Altitude are UDP, so they are limited to 1500 bytes to ensure they fit into any MTU size. By setting max users to 64, you were reserving over 2/3 of the config packet just for users. Add in my server commands and the maps, and of course you would go over. I would say, you are probably coming pretty close just with the 64 users and all the custom commands for Alti+ to the 1500 limit. I wouldn't increase the player count.

Be aware with a player count that large, that you may have to override the default heap sizes for your JVM, it will take a lot of memory for an Altitude server to keep track of all those users. At least, I would think that to be the case.

kevATin commented 4 years ago

"I wouldn't increase the player count." With xxEnabled it should be fine though, shouldn't it? Each of my servers is supposed to run one map; so that won't be taking up too much space.

Yeah I was wondering about that; according to what I read in some of the logs the default seems to be 64mb. How can I get the server to start with "-Xmx128m"?

Edit: Also while we're at it; is it possible to force a server to run with more than 64 player slots? Would the clients be able to handle that?

biell commented 4 years ago

In your altitude root directory (next to the server_configurator, game.jar, and other files like that) you create a file called server_launcher.vmoptions and put your options in it, one per line. I believe -Xmx128m is the default, so you are OK there. Mine looks like this to have 128 be the min and 192 be the max:

-Xms128m
-Xmx192m

I don't know if you can run more than 64 players, I have never tried more than 20.

kevATin commented 4 years ago

Ok, thanks, will try that.