SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2396)') during performance testing in Locust for the upload PUT request
Test execution is in Locust based on HttpUser on MacOS. I'm receiving that kind of error during the upload of file testing, for the file with ~10 MB. The error appears only for more users than 40, rps rate is always equal to users. I reviewed many topics about SSL errors, I've upgraded all packages related to OpenSSL, also I installed packages related to httpsclient, but it didn't solve the issue, still, for a few PUT requests I'm receiving
PUT doc_upload_bigSize_PUT_method: SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2396)')
I'm not so experienced in performance tests, so maybe the fault is on my side, but still, it is strange that a lot of requests are passing, but 2-3 of them are returning SSLEOF.
This is how it looks from a script perspective: upload method:
@staticmethod
def file_upl_pdf(dirname, file_name):
upload = open(f"{dirname}/{file_name}", "rb")
return upload
Test script:
def upload_big_size_doc(self):
file_name = "test_file_big_size.pdf"
res = self.client.post("/documents", data=json.dumps(data)), name='doc_upload_bigSize_POST_method')
json_response = json.loads(res.text)
document_id = jsonpath.jsonpath(json_response, "documentId")[0]
url_upload = jsonpath.jsonpath(json_response, "url")[0]
self.client.put(url=url_upload, data=ResourceUtils.file_upl_pdf(dirname="../test_files/big_size", file_name=file_name),
headers={'Content-Type': 'application/pdf'},
name='doc_upload_bigSize_PUT_method')
here I'm running a test:
@task
def perf_test(self):
self.upload_big_size_doc()
I would like to see rather errors coming from load tests about infra like timeout or something, but SSLEOF seems to me like a bad behaviour of my scripts or config.
source https://stackoverflow.com/questions/74837447/ssleoferror8-eof-occurred-in-violation-of-protocol-ssl-c2396-during-per
Comments
Post a Comment