This can be caused by running a test with zero pacing time and little or no think time. When the script runs and an error occurs, the next iteration immediately starts, and the error occurs again. This is called the cascade error effect. The best way to stop this, is to put a validation in your script to capture the error and abort the script when error occurs.
If you can't do this, make sure that you set the pacing interval in the run-time setting to at least 60 seconds to prevent the cascading of errors. When a cascade effect occurs, your test is totally invalid and you can't rely on the test result as the cascade of errors has a very damaging effect on system performance as the thousands of errors that you mentioned above occurs.
Also, never user the ''Continue On Error'' run-time setting as this will exacerbate the effect of multiple errors.
Remember that in load testing we are trying to simulate the servers effect of multiple users. An error cascade will nullify all attempts to run a real-world test.