The request was aborted: Could not create SSL/TLS secure channel
Recently, I have been receiving the error “The request was aborted: Could not create SSL/TLS secure channel” when performing a C# WebRequest to the Forms API. The error happens randomly about 5% of the time. Nothing has changed in the code used to submit to the Forms API. The errors just started cropping up a few weeks ago. Below is the network trace log for one of the failed requests. A quick google search reveals that it’s possibly the remote server prematurely closing the connection.
Brilliant! That's great news. I'll consider this resolved for now, but going forward feel free to bump this thread if these failures end up recurring in the future.
I believe we've resolved the issue on our end. It looks like it was a heightened security setting on our end that resulted in some requests being erroneously filtered out. That should be resolved as of right now; can you continue to monitor your requests and let me know if you continue to see these failures?
That all appears fine to me, thanks for the example. At this point, I'm going to have to dig a bit deeper into some of our logs to see if I can find any clues. Can you send me the following details for the most recent failure you have:
The ip address your request is coming from
The timestamp of the error
The full url you made the request to
presumably this one? https://forms.hubspot.com/uploads/form/v2/111368/40055487-5d1a-4de0-a85d-87d8104cc717
With that info, I'll dig around in our system and CDN logs to see if I can find any more info on what might be going on. Thanks again for your patience here, I look forward to getting this all sorted.
Thanks for your patience here. The forms API servers are part of a pool, but all servers are up-to-date with identical configurations. When you say that you’re setting the connection timeout to 100 seconds, are you referring to a request timeout (e.g. you wait for a server response for 100s) or how long you’re keeping a connection alive (e.g. you open a connection that is used for multiple requests for 100s). Also, are you connecting to the HubSpot API and then making a request to Google’s Recaptcha service before making the request to HubSpot?
Here’s where my head is at:
This could be a timeout on our end:
If the time between your server opening a connection and actually sending the data is too long, we might be timing out the request.
If you’re keeping a connection open for a fixed 100 seconds (even without request traffic) we might be timing out the connection. It’s possible your server might then attempt to re-use that connection and fail.
This could be a connection management issue:
If you’re setting a 100 second lifespan for a connection being used by your server to make multiple requests, rather than letting the server defaults manage the connection lifespan, there could be requests being made right before the 100s connection limit, resulting in lost requests.
Does any of that sound like it might be happening to you? I’m not familiar with your systems, so I’m making a few assumptions and trying to identify possible causes. Can you give me some more info regarding your setup?
The request was aborted: Could not create SSL/TLS secure channel
Hi Derek. Thank you for replying. I really appreciate it
I’m using C# to create a WebRequest object. I am creating a new object for each call, so I don’t think there’s an issue with the connection being held open. I’m not exactly sure how .NET does that behind the scenes, so I can’t be 100% positive. Below is the code I’m using to post to the Forms API.
As for Recaptcha, I’m calling the validation API before calling the hubspot API, so I know the form submission from our website is valid. I am using the same WebRequest (new object, not reusing an existing one) method to interact with the Recaptcha API. That process succeeds 100% of the time.
Andrew Wilinski | Supervisor, IS | BOSS Products | (906) 776-3621
This looks to me like it might be caused by some general network issues between your server and the HubSpot API. Do you see any similar issues with other services? Other possible explanations:
It’s possible that we’re timing out the request if there’s a significant delay between when you open the connection and when you send along the data.
We might be closing the connection if you’re setting the Transfer-Encoding: header to chunked
The request was aborted: Could not create SSL/TLS secure channel
I have no issues with any other services. I use Google’s Recaptcha service right before the hubspot forms API call. The Recaptcha service never errors out.
The timeout for the connection is set to 100 seconds. I would have to believe that would be ample time to complete the request. I am not setting any Transfer-Encoding header in the request.
About 95% of the time, the forms api submission is successful. The other 5% fail with this error. There has been no code of server configuration changes on my side. This started happening about 4 weeks ago. Prior to that there was no issues. To me it feels like there’s a server in the hubspot forms api server pool that’s not behaving properly and I seem to be hitting that server about 5% of the time.