Bug report #9395
WFS layers time out, even though the timeout is not reached
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Web Services clients/WFS | ||
Affected QGIS version: | 2.10.0 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 17993 |
Description
Whenever I open existing projects containing WFS layers, I often get errors like this in the log, and the layer is marked as "Invalid":
"Network request http://wfs.brandsoft.dk/geoserver/wfs_service_stroeby/ows?SERVICE=WFS&VERSION=1.0.0&TYPENAME=wfs_service_stroeby:Strøby_Afdeling&&REQUEST=DescribeFeatureType timed out"
I can then manually re-query the layer from the WFS server, and it loads up just fine. It seems to me, that WFS does not respect the value "Network query timeout (ms)" in Options->Network, where the default is 60000, ie one minute, which should be more than enough.
Can somebody please verify this - or give another probably reason as for why this happens?
History
#1 Updated by Giovanni Manghi over 10 years ago
- Priority changed from High to Normal
- Operating System deleted (
Windows 32-bit) - OS version deleted (
7 and newer)
Yes, it happens many times and the timeout option does not seems to have any effect.
#2 Updated by Jacob Madsen over 10 years ago
Could I get some feedback on this? Still reproduces from time to time on build 57dd877
#3 Updated by Jacob Madsen over 10 years ago
- Assignee changed from Marco Hugentobler to Jürgen Fischer
Hi Jürgen
As you seem to know the networking code of QGIS very well, could I get you to take a look at this? It's my only known remaining issue for 2.0 master. It would be really, REALLY great, if something could be done about this.
Thanks in advance,
Jacob
#4 Updated by Matthias Kuhn over 10 years ago
- Assignee changed from Jürgen Fischer to Matthias Kuhn
I'm currently having a look at this. Assigning to myself to avoid doubled up work.
#5 Updated by Jacob Madsen over 10 years ago
- Status changed from Open to Closed
I've not been able to fully determine, that is a QGIS issue and not a Geoserver issue. For that reason, I'll close this issue until I eventually see it again and can provide more information.
#6 Updated by Jacob Madsen over 9 years ago
Hello
I need to reopen this case. This issue still occurs frequently for specific users. I'm on QGIS 2.6 now, and the server is GeoServer 2.6.2. The WFS layers are running against an Oracle 12c database with the newest JDBC driver available. I don't see what else can be updated in this setup.
When the user gets the timeout on the client, I have monitored Geoserver's log file. I can see, that the requests indeed are made. The problem is, that it occurs sporadically and is not easy to reproduce.
Can somebody help here?
#7 Updated by Giovanni Manghi over 9 years ago
Jacob Madsen wrote:
Hello
I need to reopen this case. This issue still occurs frequently for specific users. I'm on QGIS 2.6 now, and the server is GeoServer 2.6.2. The WFS layers are running against an Oracle 12c database with the newest JDBC driver available. I don't see what else can be updated in this setup.
When the user gets the timeout on the client, I have monitored Geoserver's log file. I can see, that the requests indeed are made. The problem is, that it occurs sporadically and is not easy to reproduce.
Can somebody help here?
does the issue surfaces by using other wfs clients? and older qgis releases?
#8 Updated by Jacob Madsen over 9 years ago
As far as I know, we encountered this issue back as early as version 2.0, and it's been present since.
We have not tried other wfs-t clients, as I've been unable to find any really usable ones. uDig seems quite broken to me. Can you recommend any alternatives?
#9 Updated by Giovanni Manghi over 9 years ago
Jacob Madsen wrote:
As far as I know, we encountered this issue back as early as version 2.0, and it's been present since.
and in qgis 1.8 (or earlier)?
Can you recommend any alternatives?
gvsig has a wfs client.
#10 Updated by Jacob Madsen over 9 years ago
Giovanni Manghi wrote:
Jacob Madsen wrote:
As far as I know, we encountered this issue back as early as version 2.0, and it's been present since.
and in qgis 1.8 (or earlier)?
Can you recommend any alternatives?
gvsig has a wfs client.
I tried gvSIG Desktop, but its WFS client doesn't seem to support services, which require username and password, so I can't use it. If I try against one of my services, instead of asking for a username and password, I just get the message "Connection failed. Server redirected too many times (20)". Do you know of other WFS-T clients I can try? I can't just allow open access to production data.
#11 Updated by Giovanni Manghi over 9 years ago
I tried gvSIG Desktop, but its WFS client doesn't seem to support services, which require username and password, so I can't use it. If I try against one of my services, instead of asking for a username and password, I just get the message "Connection failed. Server redirected too many times (20)". Do you know of other WFS-T clients I can try? I can't just allow open access to production data.
kosmo gis seems to have a wfs client with authentication support.
#12 Updated by Miguel Penteado almost 9 years ago
- Assignee changed from Matthias Kuhn to Giovanni Manghi
- Status changed from Closed to Reopened
Dear Developers
I have experiencied same trouble. My configuration is that:
==============================================Server machine=================== | ======Client=============== |
=============================================================================== | =========================== |
<POSTGRES/POSTGIS 9.3>===========(JDBC)==<GeoServer 2.8 stable>(WFS-server)==== | ===(WFS-Client)< QGIS 2.10> |
=============================================================================== | =========================== |
=========================================Linux Localhost======================= | =====Linux Client========== |
I figured that wfs client timeout's happens on qgis 2.10 at 20 secs, if it don't get yet features from server (in my case: query started by geoserver on postgis belongs 4 minutes before send results back to geoserver, and then, back to wfs client).
So a had tried to download sgml file from wfs server with a simple raw curl http client, somthing like that:
curl -X 'GET' -H '*Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8*' -H 'Accept-Encoding: deflate' -H 'Accept-Language: pt-BR,en-US;q=0.7,en;q=0.3' -H 'Connection: keep-alive' -H 'Host: myserver.com.br:8080' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0' --cookie 'JSESSIONID=9742EBB3A203846020AA3D7F130CFB5C' --cookie '_ga=GA1.3.1360557005.1435772510' --cookie 'csrftoken=FeHsf4ptLa5dZ7CGRFvuyxI2z8zMWlBh' --cookie 'LtpaToken=AAECAzU2NTg0ODU5NTY1ODU2NjlDTj1NaWd1ZWwgU3VhcmV6IFhhdmllciBQZW50ZWFkby9PVT1TUC9PPUlCR0VKF79kMTMTO5yzUbnmdlK5e+qZXg==' 'http://myserver.com.br:8080/geoserver/americana/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=americana:americana-eixos' > americana-eixos.xml
The curl result:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 47.6M 0 47.6M 0 0 161k 0 --:--:-- 0:05:01 --:--:-- 11.2M
----------------------------------------------------
curl "wfs client" <-no-timeout--5 min-> geoserver
QGIS wfs client <----timeout--20 secs-> geoserver
----------------------------------------------------
In my suspects, there are some python code parameter in WFS client code on QGIS that sets timeouts if servers don't send any features in 20 secs (by default). Timeout is on client side.
Best regards
Miguel Suez Xve Penteado
#13 Updated by Giovanni Manghi almost 9 years ago
- Affected QGIS version changed from 2.0.1 to 2.10.0
- Assignee deleted (
Giovanni Manghi) - Target version deleted (
Future Release - High Priority)
#14 Updated by Jeremy Palmer over 8 years ago
I think this issue can be best resolved by first respecting the server-side timeout setting. Currently the QGIS network timeout settings will cancel a query even if server is still in progress. I think one option here is to Change the user defined client-side timeout setting option to allow users to turn it off. e.g value of 0 = wait for server to timeout. In the content of the WFS provider its certainly best to let the server timeout, or let the user can cancel the request via the WFS progress dialog.
#15 Updated by Even Rouault over 8 years ago
Regarding the 60s default timeout not being obvserved, I noticed it was ~ 20 seconds. This is because of an inconsistency in the default value of the parameter :
../src/core/qgshttptransaction.h: int networkTimeout() const { return mNetworkTimeoutMsec;}
../src/core/qgshttptransaction.cpp: mNetworkTimeoutMsec = s.value( "/qgis/networkAndProxy/networkTimeout", "20000" ).toInt();
../src/core/qgshttptransaction.cpp: mNetworkTimeoutMsec = s.value( "/qgis/networkAndProxy/networkTimeout", "20000" ).toInt();
../src/core/qgsnetworkaccessmanager.cpp: timer->start( s.value( "/qgis/networkAndProxy/networkTimeout", "20000" ).toInt() );
../src/app/qgsoptions.cpp: mNetworkTimeoutSpinBox->setValue( mSettings->value( "/qgis/networkAndProxy/networkTimeout", "60000" ).toInt() );
../src/app/qgsoptions.cpp: mSettings->setValue( "/qgis/networkAndProxy/networkTimeout", mNetworkTimeoutSpinBox->value() );
../src/app/qgisapp.cpp: timer->start( s.value( "/qgis/networkAndProxy/networkTimeout", "20000" ).toInt() );
Basically if you never override the value of the UI, the network code will use 20s, but the UI will display 60. A #define for the factory default would be better.
#16 Updated by Even Rouault almost 8 years ago
- Status changed from Reopened to Closed
I believe this was solved in 2.16