Sign in to follow this  

TREEGROWTH on Multiple Servers

Recommended Posts

I think I've found what appears to be a bug for the TREEGROWTH setting when using multiple servers. Below is the code that appears to be executing for each configured server in the cluster on startup. Notice that all except the TREEGROWTH setting update its setting for the server data being loaded. But for TREEGROWTH, it updates the static value for the currently running server,  which means that each clustered server's value will keep overwriting the setting until the last one is reached. 


This means that the last server in the SERVERS table will determine that setting for the server that is running, not necessarily its own entry. And depending on the hosting service configuration strategies, the SERVERS table may not actually contain the correct values for other clustered servers anyway.

                try {
                    ((ServerEntry)entry).pLimit = rs.getInt("MAXPLAYERS");
                    ((ServerEntry)entry).maxCreatures = rs.getInt("MAXCREATURES");
                    ((ServerEntry)entry).maxTypedCreatures = ((ServerEntry)entry).maxCreatures / 8;
                    ((ServerEntry)entry).percentAggCreatures = rs.getFloat("PERCENT_AGG_CREATURES");
                    TilePoller.treeGrowth = ((ServerEntry)entry).treeGrowth = rs.getInt("TREEGROWTH");
                catch (Exception ex) {

I was wondering why my treegrowth setting made no difference for some servers in my cluster; I think this might explain it. When I manually set all values to the same in the database (for that server) the situation improved.

Share this post

Link to post
Share on other sites

Good catch, you seem to be right.

A local server check seems to be missing.



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this