Hubspot refuses connection intermittently


#1

The emails are failing intermittently due to connection error from Hubspot.

2018-02-21 06:14:18,464 [http-nio-8080-exec-9] ERROR  Failed to send email due to an unexpected error:
org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://api.hubapi.com/email/public/v1/singleEmail/send?hapikey={apiKey}":Connection reset; nested exception is java.net.SocketException: Connection reset.

Thanks in advance.


#2

Hi @rohand,

Thanks for your patience here, this post slipped under my radar. Can you give me some more info on these errors? Do you have more verbose logging, maybe with the error code(s)? Is this only happening with the one endpoint, or is it affecting requests across multiple services?


#3

Hi Derek,

Unfortunately, there are no more details in the logs and no error codes.
This error occurs when calling one endpoint - send transactional email

https://api.hubapi.com/email/public/v1/singleEmail/send?hapikey={apiKey}

As mentioned, the failure is intermittent and does not occur for a specific email template.


#4

I am having the same issue, but it is happening quite frequently. I see it almost 50% of the time.

I/O error on POST request for "https://api.hubapi.com/contacts/v1/contact/vid/50795761/profile": Connection reset; nested exception is java.net.SocketException: Connection reset.

Any thoughts?


#5

@brian-voicebase Clearly, this is really a server side issue but hubspot refused to resolve it.

I had to implement a hack at client side - explicitly check for stale connections and keep the connection socket alive. Hope this helps.