# Transmission "Too many files open" error



## manas (Mar 7, 2014)

Hello,

I am running net-p2p/transmission-daemon version 2.82_1. I am running into an error where while downloading multiple torrents at once results in a "Too many open files" error. The exact error is:

```
Error: Unable to save resume files. Too many open files
```
 I followed the guidelines at https://wiki.freebsd.org/NetworkPerformanceTuning to see if any of the file limits were being reached. While running the download at full speed, I find that

```
kern.ipc.numopensockets: 922
kern.openfiles: 977
```
 The default values are far from being hit here. Are there other settings that I need to tweak?

Thanks,
Manas


----------



## trh411 (Mar 8, 2014)

I think this is an internal net-p2p/transmission-daemon error, not a system or network error. What is your net-p2p/transmission-daemon setting for "global peers"? IIRC, the default is 200 and setting it significantly higher can cause this error. How many torrents are you attempting to download concurrently?

You might also check the value from `ulimit -n` for the user running net-p2p/transmission-daemon just to make sure it is not arbitrarily low. That command will show the limit for open files for that user.


----------



## manas (Mar 8, 2014)

```
"peer-limit-global": 5000
"upload-slots-per-torrent": 500
```

On reviewing the settings.json file, I found an extra 0 on upload-slots-per-torrent -- it was 5000 instead of 500. I stopped transmission-daemon, changed the setting and started transmission-daemon again. The downloads went through this time, I only had about 7-10 torrents downloading. I tried downloading 87 at once before but that was a very bad idea, I have set maximum concurrent downloads to be 25. `ulimit -n` is 234468.


----------



## trh411 (Mar 8, 2014)

Yeah, a setting of 5000 is a bit much for global peers.


----------

