eclipse-archived / ceylon

The Ceylon compiler, language module, and command line tools
http://ceylon-lang.org
Apache License 2.0
396 stars 62 forks source link

Support timeouts #4742

Open CeylonMigrationBot opened 10 years ago

CeylonMigrationBot commented 10 years ago

[@FroMage] Apparently the Sardine impl does not support timeouts, if I try to publish to an HTTP server which hangs (see #1364) it will never timeout. We need to find a way to make it timeout.

[Migrated from ceylon/ceylon-module-resolver#80]

CeylonMigrationBot commented 10 years ago

[@quintesse] Seems someone here http://stackoverflow.com/questions/18664482/sardine-attempt-to-override-createdefaultsecuresocketfactory-not-working-as-e had the same problem. No solution unfortunately.

I also found this http://svn.alfresco.com/repos/alfresco-open-mirror/desktop-sync/HEAD/src/main/java/com/alfresco/sync/filestore/util/CustomSardineImpl.java which seems to support timeouts.

CeylonMigrationBot commented 9 years ago

[@quintesse] Ok, this should now mostly work. The only thing is Aether because I don't know how to pass that information to it. It has the workOffline setting, but I don't see anything related to connection timeouts. @alesj , do you have any ideas?

CeylonMigrationBot commented 9 years ago

[@alesj] @quintesse hmmm, it could be some Wagon setting, but no exact idea from my side.

CeylonMigrationBot commented 9 years ago

[@quintesse] @alesj You had some contact with the ShrinkWrap people, right? Couldn't you ask them if there is a way?

CeylonMigrationBot commented 9 years ago

[@alesj] @kpiwko @aslakknutsen any idea if there is some timeout support in Aether?

CeylonMigrationBot commented 9 years ago

[@kpiwko] @alesj there is a request timeout (30min) and connection timeout (10s) in Aether. So it should timeout even with default settings.

It should be possible to pass -Daether.connector.connectTimeout and -Daether.connector.requestTimeout as JVM system properties. I can obviously expose this in configureResolver() API, just feature request is needed ;-)

CeylonMigrationBot commented 9 years ago

[@quintesse] Thanks @kpiwko . Where would I open that feature request? :) And a question, is the "request timeout" the same thing as the "read timeout" for sockets? Or is a different thing?

CeylonMigrationBot commented 9 years ago

[@kpiwko] @quintesse Any request should go here: https://issues.jboss.org/browse/SHRINKRES . Request timeout is indeed SO_TIMEOUT - https://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/params/HttpConnectionParams.html#SO_TIMEOUT

CeylonMigrationBot commented 9 years ago

[@kpiwko](note Aether actually uses HttpClient 4.x, not 3.x)

CeylonMigrationBot commented 9 years ago

[@quintesse] Ok thanks! Issue created, see https://issues.jboss.org/browse/SHRINKRES-208

CeylonMigrationBot commented 9 years ago

[@quintesse] We could consider this closed because at least there shouldn't be any places anymore in the code that can cause hangups. But I'll reassign the issue to 1.2 so I remember to check the progress of the above feature request.