Dusty Boshoff Dusty Boshoff - 1 month ago 31
Python Question

Python loop causing "error: [Errno 105] No buffer space available"

I have a loop that goes through a Range(300) and creates a Thread with 'import threading'.. So this creates 300 threads, which is correct.

However I'm getting a problem where not all the threads start up, and a error is shown in console. as below

File "/usr/local/lib/python2.7/dist-packages/scapy/supersocket.py", line 29, in send
return self.outs.send(sx)
error: [Errno 105] No buffer space available


Q: Is there a way I can increase the buffer?

Q: Is this a python limit, or a process limit?

Answer

concurrent.futures is working for me. Thank @BartoszMarcinkowski.

what I did was as follows.

import concurrent.futures

for i in my_list:
   concurrent.futures.ThreadPoolExecutor(max_workers=1).submit(start_my_function)