hopefully fix random freeze issue due to sockets not being closed for regular api calls in jsonapi (running out of file handles), some refactoring, send more server info for admin console