logs and max threshold in server and sleep in port.read