RCP: 0.7.5, Fix timeout error at start-up when user is using a proxy
During TXM startup, the splash screen is frozen for X minutes.
See attached log file for stacktraces.
Solution1: Change the timeout length.
The timeout parameter is stored in a HttpParams and read with
PlainSocketFactory.connectSocket :
int timeout = HttpConnectionParams.getConnectionTimeout(params);
Using pref name :
public static final String CONNECTION_TIMEOUT = “httconnection.timeout”;
To change the behavior, ones need to modify this global variable
org.apache.httparams.CoreConnectionPNames
Solution 2: set native mode
We also need to try to define the default “Network connection” preference to “Native”. A link : http://eclipsesource.com/blogs/2012/06/01/eclipse-proxy-and-p2/
Or to it programmaticaly:
/**
* Activates the proxy service and sets the network connection active provider as native.
*/
private void activateProxyService() {
Bundle bundle = Platform.getBundle("org.eclipse.ui.ide"); //$NON-NLS-1$
IProxyService proxyService = null;
if (bundle != null) {
ServiceReference ref = bundle.getBundleContext().getServiceReference(IProxyService.class.getName());
if (ref != null)
proxyService = bundle.getBundleContext().getService(ref);
}
if (proxyService == null) {
Log.warning("Proxy service could not be found."); //$NON-NLS-1$
}
// Set the network connection active provider as native
else {
proxyService.setSystemProxiesEnabled(true);
proxyService.setProxiesEnabled(true);
}
}
The native OS proxy detection may be done by adding some native packages linked to org.eclipse.core.net for each target platform (eg. org.eclipse.core.net.win32.x86_64)
Solution 3:
- something is trying to use the network before the proxy is set
- like the automatic update: #1036
- something else ?? not found yet
Solution 4
Add the following run arguments to the product configuration:
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.connectTimeout=1000
-Dorg.eclipse.ecf.provider.filetransfer.browse.connectTimeout=2000
-Dorg.eclipse.ecf.provider.filetransfer.browse.readTimeout=1000
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout=2000
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=2000
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.retryAttempts=2
(from redmine: issue id 525, created on 2014/01/17 by Matthieu Decorde)
- Relations:
- relates #868 (closed)
- parent #1022 (closed)
- Uploads:
- proxy_stacktrace.txt