CentOS: Python 스크립트 실행 시 피어 오류로 인해 연결이 재설정되었습니다.

CentOS: Python 스크립트 실행 시 피어 오류로 인해 연결이 재설정되었습니다.

저는 대학 프로젝트를 위해 Python을 사용하여 트래픽 생성 도구를 만들고 있습니다. 저는 Vmware에서 자체 Linux 서버와 클라이언트를 개발했습니다. 저는 Python에서 트래픽을 생성하기 위해 urllib2를 사용하고 있습니다. 여기서 직면한 문제는 클라이언트 컴퓨터에서 스크립트를 실행할 때(멀티프로세싱을 사용하여 Linux 서버에 요청을 계속 보내는 경우) 처음 몇 분 동안은 제대로 작동하지만 약 2000개의 요청이 지나면 " 피어에 재설정 연결 중" 오류가 발생하고 스크립트가 중단되었습니다. 무엇이 문제일까요? 나는 ~하려고 노력한다이것, 하지만 그건 도움이 되지 않습니다.

이 시간 초과 오류를 방지하고 몇 시간 동안 지속적으로 스크립트를 실행하려면 어떻게 해야 합니까? 센토스 6.5를 사용하고 있습니다

'''
Traffic Generator Script:
    Here I have used IP Aliasing to create multiple clients on single vm machine. same I have done on server side to create multiple servers. I have around 50 clients and 10 servers
'''
import multiprocessing
import urllib2
import random
import myurllist    #list of all destination urls for all 10 servers
import time
import socbindtry   #script that binds various virtual/aliased client ips to the script
response_time=[]    #some global variables shared between all processes
error_count=multiprocessing.Value('i',0)
def send_request3():    #function to send requests from alias client ip 1
    opener=urllib2.build_opener(socbindtry.BindableHTTPHandler3)    #bind to alias client ip1
    try:
    tstart=time.time()
    for i in range(myurllist.url):
        x=random.choice(myurllist.url[i])
        opener.open(x).read()
        print "file downloaded:",x
        response_time.append(time.time()-tstart)
    except urllib2.URLError, e:
        error_count.value=error_count.value+1
def send_request4():    #function to send requests from alias client ip 2
    opener=urllib2.build_opener(socbindtry.BindableHTTPHandler4)    #bind to alias client ip2
    try:
    tstart=time.time()
    for i in range(myurllist.url):
        x=random.choice(myurllist.url[i])
        opener.open(x).read()
        print "file downloaded:",x
        response_time.append(time.time()-tstart)
    except urllib2.URLError, e:
        error_count.value=error_count.value+1
#50 such functions are defined here for 50 clients
process=[]
def func():
    global process
    process.append(multiprocessing.Process(target=send_request3))
    process.append(multiprocessing.Process(target=send_request4))
    process.append(multiprocessing.Process(target=send_request5))
    process.append(multiprocessing.Process(target=send_request6))
#append 50 functions here
    for i in range(len(process)):
    process[i].start()
    for i in range(len(process)):
    process[i].join() 
    print"All work Done..!!"
    return
start=float(time.time())
func()
end=float(time.time())-start
print end

관련 정보