# Find Corrupted Torrents
Take care while deleting files within your torrent session state. We do not take any responsibility for accidental data deletion and cannot restore deleted data. The below procedures are provided for our clients to use at their own risk.
This guide will cover how to find and remove a corrupted torrent in your torrent client. Occasionally, a torrent can become corrupted and cause your torrent client to crash. This can be somewhat complicated to troubleshoot and diagnose, as there are many reasons for why a torrent client might crash. Before we begin, let's introduce the available torrent clients, their strengths, and weaknesses. The information below will help you decide what torrent client to use. Please note that the below characteristics are highly subjective and may not align with your specific use case. The number of torrents listed is are soft limits. - **[Deluge](https://docs.ultra.cc/books/deluge/page/deluge)** - Unstable and fast downloading, with a limit of **100** torrents for v1 and **2000** torrents for v2 - **[qBittorrent](https://docs.ultra.cc/books/qbittorrent/page/qbittorrent)** - Stable and fast seeding, with a limit of **10K** torrents - **[rTorrent](https://docs.ultra.cc/books/rtorrent-rutorrent/page/rtorrent-rutorrent)** - Unstable and slow seeding, with a limit of **2000** torrents - **[Transmission](https://docs.ultra.cc/books/transmission/page/transmission)** - Slow and featureless, with a limit of **25K** torrents These torrent clients are running in a shared environment on Ultra.cc. We do not recommend nor officially support torrent clients with torrent sessions above these limits. ## qBittorrent If your qBittorrent instance is able to start up, but immediately becomes unreachable, it is possible that you have torrent files that are corrupted. To locate a corrupt torrent file in qBittorrent, you need to monitor the log output. Logging is enabled by default in qBittorrent and no further action is needed to get started.If the qBittorrent log file throws torrent file errors without the hash string included, you need to locate the torrent hash from someplace else. A possible solution is to upgrade your qBittorrent instance to a newer version (if you aren't already on the newest version) and restore your torrent session. Then, restart qBittorrent and fetch the torrent hash from the webUI before qBittorrent crashes. This is not always possible, but will work in some cases. See our Torrent Session Migration guide for instructions on how to restore a torrent session.
- Connect to your Ultra.cc service via [SSH](https://docs.ultra.cc/books/secure-shell-%28ssh%29/page/how-to-connect-to-your-ultracc-slot-via-ssh) - Before you begin troubleshooting, you should backup your qBittorrent instance by following the instructions [here](https://docs.ultra.cc/books/misc-guides/page/restore-application-backup). - Alternatively, to manually backup qBittorrent, you can make copies of the below directory paths. - `~/.local/share/qBittorrent` - `~/.config/qBittorrent` - Next, you can begin monitoring the qBittorrent log file in real-time by executing the following command: - To stop the real-time monitoring, press `CTRL+C`. ```sh tail -f ~/.local/share/qBittorrent/logs/qbittorrent.log ``` - While you are monitoring the qBittorrent log file in real-time, proceed to restart your qBittorrent instance. - Restart qBittorrent from the **Apps** tab on the [UCP](https://cp.ultra.cc), or by executing `app-qbittorrent restart`. - During the restart of qBittorrent, keep an eye on the real-time monitoring of the log file and look for any errors. - If errors are found, take note of the error and exit the real-time monitoring by pressing `CTRL+C`. - Next, if there were any corrupted torrents, you will see errors such as `Unable to resume torrent 'Enabling logging of rTorrent should only be done temporarily. Leaving logging enabled for a prolonged time will create very large log files, and could lead to your storage being filled up.
- Connect to your Ultra.cc service via [SSH](https://docs.ultra.cc/books/secure-shell-%28ssh%29/page/how-to-connect-to-your-ultracc-slot-via-ssh) - Stop rTorrent from the [UCP](https://cp.ultra.cc), or by executing `app-rtorrent stop` - Create a `log` directory and backup torrent session by executing the following command: ```sh mkdir ~/.config/rtorrent/logs && cp -r ~/.config/rtorrent/session ~/.config/rtorrent/session.bak ``` - Next, to enable logging in rTorrent, open `.rtorrent.rc` with the nano editor: ```sh nano ~/.rtorrent.rc ``` - At the end of the configuration file, paste the following: ``` log.open_file = "rtorrent", ~/.config/rtorrent/logs/rtorrent.log log.open_file = "tracker", ~/.config/rtorrent/logs/tracker.log log.open_file = "storage", ~/.config/rtorrent/logs/storage.log log.open_file = "network", ~/.config/rtorrent/logs/network.log log.add_output = "info", "rtorrent" log.add_output = "critical", "rtorrent" log.add_output = "error", "rtorrent" log.add_output = "warn", "rtorrent" log.add_output = "notice", "rtorrent" log.add_output = "debug", "rtorrent" log.add_output = "dht_debug", "tracker" log.add_output = "tracker_debug", "tracker" log.add_output = "storage_debug", "storage" ``` - Next, restart rTorrent from the [UCP](https://cp.ultra.cc), or by executing `app-rtorrent restart` - Now, wait until rTorrent crashes and then check the logs to see what torrent was last logged - To output the log in your terminal, execute the following command: ```sh tail ~/.config/rtorrent/logs/storage.log ``` - Find the last torrent logged and execute the command in the box below: - The `TORRENTID` will be in the format of `4CC1F979463A4852574E0DE8E111084C19342F83` - Make sure to include the `*` at the end of the command, as it will remove all related files. ``` rm ~/.config/rtorrent/session/TORRENTID* ``` - Then, restart rTorrent from the [UCP](https://cp.ultra.cc), or by executing `app-rtorrent restart` - Next, if rTorrent crashes again, repeat the process. - Stop rTorrent - Find the latest torrent ID in the log - Remove the files associated with the torrent ID - Restart rTorrent