diff --git a/docs/source/man_sbws.ini.rst b/docs/source/man_sbws.ini.rst index 8faa719..5338ba7 100644 --- a/docs/source/man_sbws.ini.rst +++ b/docs/source/man_sbws.ini.rst @@ -174,9 +174,9 @@ logging to_file_level = {debug, info, warning, error, critical} Level to log at when using files. (Default: debug) to_stdout_level = {debug, info, warning, error, critical} - Level to log at when using stdout. (Default: debug) + Level to log at when using stdout. (Default: info) to_syslog_level = {debug, info, warning, error, critical} - Level to log at when using syslog. (Default: debug) + Level to log at when using syslog. (Default: info) format = STR Format string to use when logging. (Default: %(asctime)s %(module)s[%(process)s]: <%(levelname)s> %(message)s) diff --git a/sbws/config.default.ini b/sbws/config.default.ini index 79d089c..ccf300c 100644 --- a/sbws/config.default.ini +++ b/sbws/config.default.ini @@ -19,7 +19,7 @@ data_period = 10 # single float. Requests will use it both as the connect() timeout and the # timeout between bytes received from the server. See # http://docs.python-requests.org/en/master/user/advanced/#timeouts -http_timeout = 600 +http_timeout = 300 # Timeout in seconds for waiting on a circuit to be built. It MUST be an # **int**. We will use this both as the CircuitBuildTimeout and a timeout # to give to stem for waiting on a circuit to be built since @@ -46,17 +46,17 @@ dirauth_nickname = dirauth_nickname # Limits on what download times are too fast/slow/etc. download_toofast = 1 download_min = 5 -download_target = 10 -download_max = 100 +download_target = 6 +download_max = 10 # How many RTT measurements to make num_rtts = 0 # Number of downloads with acceptable times we must have for a relay before # moving on -num_downloads = 1 +num_downloads = 3 # The number of bytes to initially request from the server initial_read_request = 16384 # How many measurements to make in parallel -measurement_threads = 4 +measurement_threads = 3 # Minimum number of bytes we should ever try to download in a measurement min_download_size = 1 # Maximum number of bytes we should ever try to download in a measurement @@ -124,10 +124,10 @@ to_file_max_bytes = 10485760 to_file_num_backups = 50 # Level to log at. Debug, info, warning, error, critical. # `level` must be set to the lower of all the handler levels. -level = info -to_file_level = info -to_stdout_level = info -to_syslog_level = info +level = debug +to_file_level = debug +to_stdout_level = debug +to_syslog_level = debug # Format string to use when logging format = %(asctime)s %(module)s[%(process)s]: <%(levelname)s> (%(threadName)s) %(message)s to_stdout_format = ${format} diff --git a/sbws/core/scanner.py b/sbws/core/scanner.py index 51c1743..32febb3 100644 --- a/sbws/core/scanner.py +++ b/sbws/core/scanner.py @@ -156,7 +156,7 @@ def measure_rtt_to_server(session, conf, dest, content_length): rtts = [] size = conf.getint("scanner", "min_download_size") for _ in range(0, conf.getint("scanner", "num_rtts")): - log.debug("Measuring RTT to %s", dest.url) + log.info("Measuring RTT to %s", dest.url) random_range = get_random_range_string(content_length, size) success, data = timed_recv_from_server(session, dest, random_range) if not success: @@ -556,10 +556,8 @@ def measure_relay(args, conf, destinations, cb, rl, relay): """ log.debug("Measuring %s %s", relay.nickname, relay.fingerprint) our_nick = conf["scanner"]["nickname"] - timeout = conf.getfloat("general", "http_timeout") - log.error("Timeout is set to %s", timeout) s = requests_utils.make_session( - cb.controller, timeout + cb.controller, conf.getfloat("general", "http_timeout") ) # Probably because the scanner is stopping. if s is None: