From: Raif S. N. <ra...@fo...> - 2012-09-19 22:00:39
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 hi Matthijs, thanks for the pointer! looking through the commit i see where the same 'timeout' value is now being used to set the connection's connect as well as read timeouts. it's unclear to me though how explicitly setting this property will work when setting the default socket read timeout is not --the - -Dsun.net.client.defaultReadTimeout-- but i'm willing to give this a try at this stage. however switching to 2.7.4 may not be as simple as it sounds. patching the 2.7.3 version is much simpler. i'll amend the AbstractOpenWebService code to set the connection's read timeout based on the value of a system environment named ows.client.readTimeout if/when set. i'll follow up w/ the result after testing incl. the patch if it works. On Wed, 19 Sep 2012 09:52:32 +0200 Matthijs Laan <mat...@b3...> wrote: > Hi Raif, > > I think the read timeout is set with the WebMapServer(URL, int) > constructor in version 2.7.4 in which includes the patch for > GEOT-3860: > > https://jira.codehaus.org/browse/GEOT-3860 > https://github.com/geotools/geotools/commit/c70bc6ac2dcbd42401333e781fff882ed4db6625 > > Matthijs > > On 2012-09-19 05:37, Raif S. Naffah wrote: > > hi there, > > > > this is not strictly a GeoTools library issue but i'm hoping some > > user / developer has seen this before and can shed some light and > > help me find a work-around. > > > > i'm using version 2.7.3 of the GeoTools WMS library: > > gt-wms-2.7.3.jar to build and submit a WMS GetMap request to a > > GeoServer (version 2.1.2), which btw. uses the same version of the > > GeoTools JARs. > > > > the problem i'm having is in one setup the GetMap request times out > > after 30 seconds. here is the top of the stack trace: > > > > java.net.SocketTimeoutException: Read timed out > > at java.net.SocketInputStream.socketRead0(Native Method) > > at > > java.net.SocketInputStream.read(SocketInputStream.java:129) at > > java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at > > java.io.BufferedInputStream.read1(BufferedInputStream.java:258) at > > java.io.BufferedInputStream.read(BufferedInputStream.java:317) at > > sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687) at > > sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632) at > > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1049) > > at > > org.geotools.data.ows.AbstractOpenWebService.internalIssueRequest(AbstractOpenWebService.java:432) > > at > > org.geotools.data.wms.WebMapServer.issueRequest(WebMapServer.java:409) > > > > this 30-second 'barrier' happens even after forcing the JVM (Oracle > > java version "1.6.0_20") that contains the code causing the above > > is started w/ a > > > > -Dsun.net.client.defaultReadTimeout=600000 > > > > system property. > > > > i checked the source and there are 2 constructors for the > > WebMapServer type: one w/ the URL of the OGC server and the other > > w/ an additional 'timeout'. i'm using the first one w/ the URL to > > the GeoServer only. the second constructor channels the 'timeout' > > value to the AbstractOpenWebService superclass and ultimately uses > > this value for 'connect' (not read) timeout --line #390: > > > > connection.setConnectTimeout(this.requestTimeout); > > > > so from the look of it even if i use the 2nd constructor it does not > > look like it will be fixing my issue: read (not connect) timeout. i > > should also mention that the request makes to the GeoServer > > end-point but the result does not make it back. > > > > > > the only 30-second limit i could find in the setup where the problem > > occurs is the 'maxIdleTime' property in the GeoServer's jetty.xml > > for the 'SelectChannelConnector' being used. > > > > anybody seen this or similar issue before? ideas on solving or > > working around this is much appreciated. > > > > > > TIA + cheers; > > rsn > > ------------------------------------------------------------------------------ > > Live Security Virtual Conference > > Exclusive live event will cover all the ways today's security and > > threat landscape has changed and how IT managers can respond. > > Discussions will include endpoint security, mobile security and the > > latest in malware threats. > > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________ GeoTools-GT2-Users > > mailing list Geo...@li... > > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. > Discussions will include endpoint security, mobile security and the > latest in malware threats. > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ GeoTools-GT2-Users > mailing list Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users - -- cheers; rsn -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Que du magnifique iEYEAREDAAYFAlBaQGwACgkQ+e1AKnsTRiFdZgCgurzVq2+Af1T43QCepQ0ndUAZ I9YAn07YYKtFYDZwUM/+qgg262fHc18Q =XEiw -----END PGP SIGNATURE----- |