I guess that your threads are doing something very short so in case of 16+ concurrent threads you're receiving errors.
When you use 20 threads only it's likely that you run into situation that some tests have already finished their work and others haven't been started yet.
There are some techniques to control behavior.
- Increase loops number in Thread Group (or put your logic under Loop Controller) and play with Ramp-Up Period to simulate increasing load.
- Use Synchronizing Timer to assure that given number of threads will be fired at the same moment
- Use Constant Throughput Timer to set exact load (requests per second) for your site.