problems saving a MSSQL layer in QGIS

666 views
Skip to first unread message

Barrett Higman

unread,
Oct 29, 2012, 12:50:51 AM10/29/12
to australian-qg...@googlegroups.com

Hi all,

 

I am using QGIS to edit the attribute and spatial data of a polyline layer that is stored in a SQL Server 2008 table. QGIS appears to become quite unstable after a while and eventually crashes requiring a restart. After the first crash I started saving my work more frequently and it appears that I can edit the data without any issues for a while then gradually (after having saved it numerous times) it will just hang for longer and longer when saving until it becomes totally unresponsive.

 

Just wondering if anybody else has experienced this? I want to continue saving regularly as I can't afford to lose the work but it seems like this frequent saving may be problem (I think!). Once QGIS has been restarted everything goes back to normal until it eventually happens again.

 

Any thought would be appreciated.

 

Cheers,

Barrett

 

Barrett Higman

GIS Officer

Alpine Shire Council

Nathan Woodrow

unread,
Oct 29, 2012, 1:49:42 AM10/29/12
to australian-qg...@googlegroups.com
Hey Barrett,

I haven't experienced this yet. How many saves does it take before you
start to notice anything, I wondering if some memory isn't getting
cleaned up.

Also can you try the nighly dev build from the OSGeo4W installer to
see if you encounter the same thing with that build.

Regards,
Nathan
> --
> You received this message because you are subscribed to the Google Groups
> "Australian QGIS User Group" group.
> To post to this group, send an email to
> australian-qg...@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/australian-qgis-user-group?hl=en-GB.
>
>

Barrett Higman

unread,
Oct 29, 2012, 6:05:02 PM10/29/12
to australian-qg...@googlegroups.com
Hi Nathan,

I can't say exactly how many saves it takes as it seems to vary based on the number of edits that have occurred between saves, however, at a rough guess I would say around 10 saves and the time taken to save the data to SQL Server starts to increase until it just hangs.

I will download the nightly build and get back to you in a couple of days.

Cheers,
Barrett



Barrett Higman
GIS Officer
Alpine Shire Council
Great Alpine Road
PO Box 139
Bright Victoria 3741
Telephone: (03) 5755 0552
Mobile: 0439 368 438
Facsimile: (03) 5755 1811
Web: www.alpineshire.vic.gov.au

Luke

unread,
Oct 29, 2012, 6:27:16 PM10/29/12
to australian-qg...@googlegroups.com
Hi Barrett

 

I have been doing some work editing data from SQL Server recently - I can't say I remember encountering that error. I have to continue that task on Thursday so I'll make note to see if I encounter the issue.
 
 
Regards,
 
Luke B
Luke Bassett
Melbourne Australia

Andy Tice

unread,
Oct 30, 2012, 7:27:29 AM10/30/12
to australian-qg...@googlegroups.com
Hi all,

This *might* not be that helpful, but I've not had this kind of problem when attributing / editing a sizeable (>20,000 unit) polygon file running off a PostgreSQL/Postgis server (currently running Lisboa 1.8.0). I do have this set up to write every 5 minutes, though. Memory limits might be the issue (and not some MS conflict), have you got anything else running whilst doing the attribution?

Cheers,
Andy

George Ross

unread,
Nov 5, 2012, 3:16:05 AM11/5/12
to australian-qg...@googlegroups.com

Hi barrett
I've been using sql server with qgis bad it's generally been pretty good. Crashes have happened but very rarely.

--

Barrett Higman

unread,
Nov 6, 2012, 5:12:31 PM11/6/12
to australian-qg...@googlegroups.com

I have tried the latest nightly development build but I seemed to have the same problem. Something that I found helped was to toggle the editing off while I was selecting the appropriate features then I would toggle the editing back on, make the change and save. From the replies I've had it seems that it is probably a localised problem so I will need to do some investigation at this end to see if there is an issue with the database.

 

Thanks to those that responded!

 

Cheers,

Barrett

 

 

 

 

Barrett Higman

GIS Officer

Alpine Shire Council

Great Alpine Road

PO Box 139

Bright Victoria 3741

Telephone: (03) 5755 0552

Mobile: 0439 368 438

Facsimile: (03) 5755 1811

Web: www.alpineshire.vic.gov.au

 

From: George Ross [mailto:polydef...@gmail.com]
Sent: Monday, 5 November 2012 7:16 PM
To: australian-qg...@googlegroups.com
Subject: Re: problems saving a MSSQL layer in QGIS

 

Hi barrett

Nathan Woodrow

unread,
Nov 7, 2012, 12:03:24 AM11/7/12
to australian-qg...@googlegroups.com
Hey Barrett,

I can't seem to reproduce the issue, not even with your data. 

Are you able to run this code in the latest build Python console (just copy and paste):

layer = iface.activeLayer()
from qgis.utils import iface

for x in xrange(20):
layer.commitChanges()
layer.startEditing()
layer.triggerRepaint()

This is at a basic level what the save button is doing - expect for the loop of course.  It might take a while to run and will hit the database everytime but I want to use it to see at what point it becomes unresponsive.

- Nathan

LawrieG

unread,
Nov 7, 2012, 1:44:52 AM11/7/12
to australian-qg...@googlegroups.com
Hi Barret,

When I was a kalamunda we experienced similar issues with qgis becoming seemingly unresponsive.
One of our workarounds was to open a second qgis and carry on editing until the first place one finished its save (most of the time qgis would save it just seemed to pause for a while)

The qgis project always had a lot of data displayed which may have contributed.
It included 6 infrastructure classes with data sets covering a 20 km x 20km region(the biggest class had 20,000 lines and polygons ) and 8gb of 10cm aerial photography.

Thanks

Lawrie

Barrett Higman

unread,
Nov 12, 2012, 11:57:38 PM11/12/12
to australian-qg...@googlegroups.com

Hi Nathan,

 

Sorry it has taken me so long to reply.

 

I was undertaking some editing of shapefiles yesterday and I experienced the same saving problem... it seems as i increase my QGIS usage (particularly editing) it appears to be more a universal editing problem not just SQL Server 2008. Apologies for the misdirection!

 

Of course the question now is, any ideas why this may be happening? Is there any way I can see what the software is attempting to do while it is hanging? I'm running QGIS version 1.8.0 on a quad-core PC with 8Gb RAM so I don't think it could be the available computing resources that is the problem?

 

Thanks again,

Barrett

 

 

Barrett Higman

GIS Officer

Alpine Shire Council

 

joh...@jbotman.com

unread,
Aug 8, 2017, 5:00:53 AM8/8/17
to Australian and New Zealand QGIS User Group
I know that this is a really old thread, but the problem persists ... even from one work place to another.

I have recently started at the City of Melton, and am experiencing the same long waits for data to save to a MS SQL server as I did at Griffith City Council.

The version of QGIS has changed over time, the version of MS SQL has changed over time. What has not changed is the behaviour. When I am editing layers - in either SQL or shape files - I find that the longer I work the longer it will take to save the data. I can save a few edits in quick time - at first. As I keep working, it doesn't seem to matter how many edits I make, it takes longer each time to save. Eventually I will get a Not Responding message, or QGIS will just curl up its toes. I have learned to recognise the save BEFORE the one that will crash and I then save my project, close it down then start again.

Two things that have not changed since this thread began, working in local government and working in an IT setup that is highly controlled.

Johanna

Nathan Woodrow

unread,
Aug 8, 2017, 5:10:38 AM8/8/17
to Australian and New Zealand QGIS User Group

Installed plugins?


You received this message because you are subscribed to the Google Groups "Australian and New Zealand QGIS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-use...@googlegroups.com.
To post to this group, send email to australian-qg...@googlegroups.com.
Visit this group at https://groups.google.com/group/australian-qgis-user-group.
To view this discussion on the web, visit https://groups.google.com/d/msgid/australian-qgis-user-group/c03f781f-da2c-4a96-b500-fb3aaa1f33fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marco Giana

unread,
Aug 8, 2017, 6:07:01 AM8/8/17
to australian-qg...@googlegroups.com
Hi all
Yes i have experienced the same issue as well. I save often but it seems too slow down after editing for 30 mins or so. Editing shape files

Marco

Installed plugins?


To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-user-group+unsub...@googlegroups.com.
To post to this group, send email to australian-qgis-user-group@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Australian and New Zealand QGIS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-user-group+unsub...@googlegroups.com.
To post to this group, send email to australian-qgis-user-group@googlegroups.com.

joh...@jbotman.com

unread,
Aug 8, 2017, 6:08:23 AM8/8/17
to Australian and New Zealand QGIS User Group
Hi Nathan,

I don't know if plugins will make much difference. I have a different set of them installed here in Melton than I did in Griffith. My colleague here in Melton has a different set again and suffers the same issues with saving and crashing.

I can talk to my boss to see if its OK for you to visit and see for yourself. We are Tech One clients.

Johanna

Installed plugins?


To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-user-group+unsub...@googlegroups.com.

Nathan Woodrow

unread,
Aug 8, 2017, 6:11:22 AM8/8/17
to Australian and New Zealand QGIS User Group

If you can get a list of plugins I can see if any have issues.

Also run with --noplugins to disable all plugins.


To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-use...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Australian and New Zealand QGIS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-use...@googlegroups.com.

To post to this group, send email to australian-qg...@googlegroups.com.
Visit this group at https://groups.google.com/group/australian-qgis-user-group.

joh...@jbotman.com

unread,
Aug 8, 2017, 6:22:52 AM8/8/17
to Australian and New Zealand QGIS User Group
I'll report back tomorrow with both our list of plugins and our trials of no plugins.

Stay tuned.

Johanna
To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-user-group+unsub...@googlegroups.com.
To post to this group, send email to australian-qg...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Australian and New Zealand QGIS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-user-group+unsub...@googlegroups.com.

Damien Smith

unread,
Aug 9, 2017, 2:31:51 AM8/9/17
to Australian and New Zealand QGIS User Group
I've been trying to find time to file a bug report but current builds of QGIS have a few issues editing MSSQL layers.  The main one is that the info tool is returning objects that it shouldn't be e.g. you click on a point object and it pops up the form for a point that's off screen which can be dangerous when entering data.  I've been using 2.18.3 and it's fairly solid with MSSQL as long as you leave parallel multi-core rendering disabled.  2.18.4 - 2.18.10 had issues with .VRT files so I hadn't been using those.  I just tried 2.18.11 and the VRT bug is fixed but the MSSQL issues remain.

That said, the only time I've experienced slow saving was when outdated plugins were loaded.

Damien

Stephen Males

unread,
Sep 6, 2017, 12:10:58 AM9/6/17
to Australian and New Zealand QGIS User Group
Hi all,

We may be experiencing a similiar issue at Georges River Council in Sydney (former Hurstville and Kogarah Councils). The more edits completed on a layer = more chance of QGIS crashing.

I'm interested to know if it only happens to others on SQL Server 2008, or has it happened to people using 2012 or more recent versions of SQL Server? If newer versions resolve the issue, it may help motivate an upgrade from 2008.

Regards,
Stephen
Reply all
Reply to author
Forward
0 new messages