Bug report #17050

Adding many WFS layers causes "Cannot create temporary SpatiaLite cache"

Added by Dan Meerschaert about 7 years ago. Updated over 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Web Services clients/WFS
Affected QGIS version:2.18.12 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:up/downstream
Crashes QGIS or corrupts data:No Copied to github as #:24949

Description

Many WFS layers added with iface.addVectorLayer seems to overload the WFS cache and prints "Cannot create temporary SpatiaLite cache" to the log.

This error occurs on 2.14, 2.17. and 2.99 that i've tried so far.

To reproduce, add a few dozen WFS layers, save them all as a layer definition and reload, or use the following script in the python console several times (attached .txt)

iface.addVectorLayer(' restrictToRequestBBOX=\'1\' srsname=\'EPSG:4326\' typename=\'sdr:nyu_2451_34490\' url=\'https://maps-public.geo.nyu.edu/geoserver/sdr/wfs\' version=\'auto\' table="" sql=',"example01","WFS")

qgisPythonWFSscript.txt Magnifier (8.4 KB) Dan Meerschaert, 2017-08-22 04:25 PM

Qgis_17050.PNG - log message output (97.4 KB) Dan Meerschaert, 2017-08-25 05:25 PM

History

#1 Updated by Giovanni Manghi about 7 years ago

  • Status changed from Open to Feedback

Tried your script on 2.18.12 on Windows and Linux and had no issues.

#2 Updated by Dan Meerschaert about 7 years ago

Giovanni Manghi wrote:

Tried your script on 2.18.12 on Windows and Linux and had no issues.

I just tried on 2.18.12 windows 64bit and got the same problem.

Did you run the attached script? I ask because the problem doesn't happen until layer # 36 or so

#3 Updated by Giovanni Manghi about 7 years ago

  • Affected QGIS version changed from 2.18.7 to 2.18.12

Dan Meerschaert wrote:

Giovanni Manghi wrote:

Tried your script on 2.18.12 on Windows and Linux and had no issues.

I just tried on 2.18.12 windows 64bit and got the same problem.

Did you run the attached script? I ask because the problem doesn't happen until layer # 36 or so

yes, I used your script. Have you tried on a clean installation and/or on another system?

#4 Updated by Dan Meerschaert about 7 years ago

Tried on a brand new win10 2.18.12 and the three versions i listed above on the same win7 machine.

#5 Updated by Giovanni Manghi about 7 years ago

  • Operating System deleted (Windows)
  • Status changed from Feedback to Open
  • Subject changed from Many WFS layers causes failures to Adding many WFS layers causes "Cannot create temporary SpatiaLite cache"

#6 Updated by Even Rouault almost 7 years ago

I've identified this as a libspatialite issue. Basically we are currently limited to SPATIALITE_MAX_CONNECTIONS / 2 = 32 WFS layers

Thread to discuss increasing this limit: https://groups.google.com/forum/#!topic/spatialite-users/ir7Iz15x_SM

#7 Updated by Even Rouault almost 7 years ago

According to libspatialite developer, the issue will be solved by packaging recent libspatialite and GEOS >= 3.5

#8 Updated by Giovanni Manghi almost 7 years ago

Even Rouault wrote:

According to libspatialite developer, the issue will be solved by packaging recent libspatialite and GEOS >= 3.5

Should we make a feature request for this?

#9 Updated by Jürgen Fischer almost 6 years ago

  • Status changed from Open to Feedback

Please test with QGIS 3.4 - QGIS 2.18 reached it's end of life.

#10 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Feedback to Closed
  • Resolution set to up/downstream

Also available in: Atom PDF