Make max_connections configurable

I needed to be able to set the max_connections value to something higher than the default (which seems to be 151, weird number), so I made these changes.