From 8ea953b8fabe5ae66c8f9f2b80b7fcdbd5d5176d Mon Sep 17 00:00:00 2001 From: Anas <77075674+anasty17@users.noreply.github.com> Date: Mon, 23 Aug 2021 10:01:33 +0300 Subject: [PATCH] To avoid mem-excceded If u r using vps, u can change this option depending on the no. Of cpu cores u have .. try nproc in terminal and multiple the no. By 4 --- bot/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/__init__.py b/bot/__init__.py index d2a0901..a2a1197 100644 --- a/bot/__init__.py +++ b/bot/__init__.py @@ -73,7 +73,7 @@ def get_client() -> qba.TorrentsAPIMixIn: qb_client = qba.Client(host="localhost", port=8090, username="admin", password="adminadmin") try: qb_client.auth_log_in() - qb_client.application.set_preferences({"disk_cache":64, "incomplete_files_ext":True, "max_connec":3000, "max_connec_per_torrent":300, "async_io_threads":32, "preallocate_all":True, "upnp":True, "dl_limit":-1, "up_limit":-1, "dht":True, "pex":True, "lsd":True, "encryption":0, "queueing_enabled":True, "max_active_downloads":15, "max_active_torrents":50, "dont_count_slow_torrents":True, "bittorrent_protocol":0, "recheck_completed_torrents":True, "enable_multi_connections_from_same_ip":True, "slow_torrent_dl_rate_threshold":100,"slow_torrent_inactive_timer":600}) + qb_client.application.set_preferences({"disk_cache":64, "incomplete_files_ext":True, "max_connec":3000, "max_connec_per_torrent":300, "async_io_threads":8, "preallocate_all":True, "upnp":True, "dl_limit":-1, "up_limit":-1, "dht":True, "pex":True, "lsd":True, "encryption":0, "queueing_enabled":True, "max_active_downloads":15, "max_active_torrents":50, "dont_count_slow_torrents":True, "bittorrent_protocol":0, "recheck_completed_torrents":True, "enable_multi_connections_from_same_ip":True, "slow_torrent_dl_rate_threshold":100,"slow_torrent_inactive_timer":600}) return qb_client except qba.LoginFailed as e: LOGGER.error(str(e))