So the case is this: i have a python script that listens on certain port for a connection, and when a client connects, it acts as a tcp forwarder, forwarding connections accordingly. somehow, the server.py script throws exception after few client.py connection:
Unhandled exception in thread started by
Traceback (most recent call last):
File "server.py", line 55, in server_thread
thread.start_new_thread(forward_client, (client_socket, server_socket))
thread.error: can't start new thread
Damn it! so i do what all people been doing, i Google.
From below two URL, i was able to understand the situation and came up with the solution: