1

I have a GCF written in python where response time is critical. The faster the better. Confirming the request was successful is not important.

It is basically a webhook forwarder. It recieves a request and relays it to however many listeners are subscribed.

I am using a thread based approach as outlined here: Flask end response and continue processing

The issue I am having is everytime I make a request to a https endpoint, I get an SSL Error:

Max retries exceeded with url: /my_function (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:997)')))

Here is the paraphrased code:

@functions_framework.http
def my_function(request):
    d = process_content(request.data)
    for listener in listeners:
        Thread(target=requests.post, args=(listener,), kwargs={"json" : d}).start()
    return "Success", 200

Can't find any information online so wondering if anyone else out there has an idea?

Thanks.

I am able to set verify to False but this is bad practice. Unsure if it is an issue in my case as the data is not particularly sensitive.

I expect to not get this error.

0 Answers0