aleph

ztellman 2017-08-09T18:33:46.950633Z

@aengelberg this is kind of a late reply, but there should be a default timeout, and it should never hang indefinitely

aengelberg 2017-08-09T18:35:20.005319Z

I see there’s a default connection-timeout of 60000.0, but I don’t see a default request-timeout.

aengelberg 2017-08-09T18:35:29.011021Z

I’m not sure what phase of my request hung.

ztellman 2017-08-09T18:35:41.018031Z

I see

ztellman 2017-08-09T18:36:08.033318Z

it would be weird for a connection to be open for hours, usually something in between has an idle timeout

ztellman 2017-08-09T18:36:35.049632Z

I will note that I've seen issues in Netty where connections close, and the notification isn't fired

aengelberg 2017-08-09T18:37:10.069442Z

I don’t know if this issue will ever happen again. I already changed my code to (deref (http/get ...) 30000 ::timeout) as miikka suggested, just in case.

ztellman 2017-08-09T18:37:12.070450Z

I've never been able to figure out how to reliably make it happen

ztellman 2017-08-09T18:37:20.075276Z

sure, that will definitely work

ztellman 2017-08-09T18:37:42.088251Z

in other Netty codebases I've added periodic checks to see if a connection is closed even though the event didn't fire

ztellman 2017-08-09T18:38:03.100167Z

I should probably do the same in Aleph, even though I've tried to avoid any sort of background tasks so far

aengelberg 2017-08-09T18:38:27.114485Z

My code is issuing thousands of paginated HTTP requests to load a bunch of data from a Campaign Monitor API, and pretty regularly, at least one request fails for a variety of reasons.

ztellman 2017-08-09T18:38:36.119697Z

gotcha

ztellman 2017-08-09T18:38:50.127452Z

well, your workaround is sound, so this probably isn't a concern to you anymore

aengelberg 2017-08-09T18:39:09.138437Z

I wrapped it with retry/backoff logic, but when the deref hung forever, my wrapper couldn’t do anything.

ztellman 2017-08-09T18:39:14.140850Z

though as always, targeting the latest Netty is always a decent idea, there are lots of fixes each release

aengelberg 2017-08-09T18:39:47.160158Z

thanks.

aengelberg 2017-08-09T18:40:01.167981Z

glad you endorse my duct tape solution.

ztellman 2017-08-09T18:40:23.180833Z

I might use manifold.deferred/timeout!, but same difference

aengelberg 2017-08-09T18:40:51.196842Z

The only real potential concern is that maybe I’ll leak a connection object if I don’t wait for it to complete.

aengelberg 2017-08-09T18:41:03.204115Z

But I doubt that issue will happen enough times (if at all) to make any impact.