Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Johan 188 posts 380 karma points
    Apr 04, 2014 @ 16:20
    Johan
    3

    Losing data on server restart

    I installed the 7.1 Beta and have upgraded to the released version and i have experienced the problem in both. Sometimes when i restart the server (using Webmatrix) document types and pages i created in the content section disappears. My Template files (my .cshtml views) does not disappear but they get deregistered from Umbraco and i have to create them again with the same name and they'll work again.

    It's running SQL CE. I have no clue what could be wrong. Should i do a fresh install and export all document types to the fresh installation?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 04, 2014 @ 16:27
    Jan Skovgaard
    102

    Hi Johan

    Since you're using webmatrix I guess that you're probably using IIS express as well.

    I'm not sure why but when using IIS express and CE SQL the issue you describe above does happen. I've seen it myself and I've seen others have the same issue. The weird thing is that if you setup a real IIS website pointing to your solution then it works - data gets saved as expected etc.

    So try making a real IIS website and point it to your folder and data should be saved each time. Consult the documentation on installing Umbraco manually if you're unsure about adding the site to IIS http://our.umbraco.org/documentation/Installation/

    So this is not really a version specific issue in Umbraco since I've seen this on both 4 and 6 as well.

    And keep in mind the running CE SQL is only recommended when playing around and testing simple stuff. If you're going to run a live-site then MSSQL is recommended.

    I can't remember if I ever reported this, but something in the back of my mind tells me I once got told it had nothing to do with Umbraco. But you could try and file a bug report at http://issues.umbraco.org/issues if you like.

    Hope this helps.

    /Jan

  • Johan 188 posts 380 karma points
    Apr 04, 2014 @ 16:41
    Johan
    0

    Thanks Jan. I was on the verge off tears over here ;( I usually don't use SQL CE but since Umbraco installed it with SQL CE without asking i thought that was the official recommendation.

    "CE SQL is only recommended when playing around and testing simple stuff" Good to know. I'm switching to MSSQL.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 04, 2014 @ 16:46
    Jan Skovgaard
    1

    Hi Johan

    Happy that it helped - I know that feeling you describe. It's not funny! But luckily it's easy to fix...even though it's still frustrating.

    Yeah I think the emphasis on the new installer is to make it easer for people to get up and running - It's pretty easy to migrate from CE SQL to MSSQL using the migration tool in webmatrix.

    If you do serious development CE SQL is too slow - But for getting started quickly on getting to know Umbraco and playing around with it it's ok.

    But if you create a bug report on the issue tracker I'd be happy to give it a vote since I see more people get confused about this. Should really just work. But hard for the boys to fix if it's really an issue related to IIS express and CE SQL.

    /Jan

  • Johan 188 posts 380 karma points
    Apr 04, 2014 @ 17:31
    Johan
    1

    Yeah, it definitely sped up the installation process so i can understand why. I created an Issue; http://issues.umbraco.org/issue/U4-4621

    Edit: Migrating using the webmatrix tool worked almost flawlessly. Only thing was it messed up the connection string so that needed som manual tinkering.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 04, 2014 @ 19:55
    Jan Skovgaard
    0

    Hi Johan

    Ah yes, should have mentioned that it requires some manual labour to change the connection string afterwards. Sometimes I'm just forgetting that because I'm almost doing it in my sleep these times :)

    /Jan

  • Dan 1285 posts 3917 karma points c-trib
    Apr 11, 2014 @ 12:39
    Dan
    0

    I just got stung with this and it's not the first time. This time I've lost around half a days work of creating data types, setting up a complex document type structure and adding prototype content. As far as I'm concerned SQLCe is dangerous and I'll never be using it again for anything - even quick/test stuff.

    I find it worrying that it is the default data store for Umbraco now, as this is surely going to bite a lot of people and cause a lot of negative sentiment.

    Unbelievably frustrating to see hours of work just disappear without trace. What can we do about this?

  • Arjan Woldring 124 posts 231 karma points
    Apr 11, 2014 @ 14:30
    Arjan Woldring
    1

    Unfortunately I have encountered the same issue. Nodes just somehow magically disappear...no (error)log entry whatsoever.. This is a big issue and I am happy that this thread has been started. The first few times I was thinking...did I do something wrong while having a hangover ;)

    I love having a quick-start database like SQLCE. I am using it a lot. And I hope that some sort of database will always be part of Umbraco. But maybe this thread needs to have a broader approach because i've read that for quite a while now SQLCE is in what microsoft calls a 'Deprecation mode'. That doesn't mean that major bugs won't be fixed but that that new features won't be added. I honestly don't know if this is a big issue but maybe we need to look at different storage solutions. Just rambling my thoughts here ;)

    Reference link for a post that microsoft did a while ago. Scroll to the bottom. http://connect.microsoft.com/SQLServer/feedback/details/776328/port-sql-compact-to-windows-rt

  • Dan 1285 posts 3917 karma points c-trib
    Apr 11, 2014 @ 15:02
    Dan
    0

    Interesting to hear Arjan. I'd suggest voting for the issue here http://issues.umbraco.org/issue/U4-4621 as it's one way of spreading the awareness. In terms of a solution I have no idea if this is specific to SQLCe or IIS Express or Umbraco, so stuck as to what to suggest going forwards, other than to never use SQLCe. I too love the speed/simplicity of SQLCe but this behaviour is a total show-stopper.

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Apr 11, 2014 @ 15:34
    Niels Hartvig
    1

    I'd love to get more details - we've seen some examples of dataloss when using WebMatrix 3, but we haven't been able to get to the bottom of the issue. SQL CE has a maximum write interval of ten seconds and there's no problems when using IIS Express without WebMatrix.

    "And keep in mind the running CE SQL is only recommended when playing around and testing simple stuff. If you're going to run a live-site then MSSQL is recommended." That's Jan Skovgaards words - not an official statement.

    In deprecation mode isn't a big issue - there's been no new features to SQL CE in two years. It's "just" an embedded database - no big deal.

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Apr 11, 2014 @ 15:42
    Niels Hartvig
    0

    @Dan, et all.: Sorry to hear that you've lost data - I'd really love to get to the bottom of this issue which we believe is someway connected to WM3 and that SQL CE only support one user.

  • Dan 1285 posts 3917 karma points c-trib
    Apr 11, 2014 @ 15:49
    Dan
    0

    Thanks Niels. I can confirm I've only experienced this with Webmatrix, but then I've never tried running IIS Express outside of Webmatrix so can't confirm in isolation.

    I'm confused as to why it will work fine all day long (meaning it's writing to the database) but then something happens and everything (back to a point) is gone. Data is getting into the database but then a big chunk is being suddenly deleted, as opposed to it not 'really' saving at all.

    The only other observation I can add is that it happened for me this time, ironically, after I'd used the SQLCe4 toolbox to script everything out to SQL Express. I noticed that not everything came out of the other side and when I checked, that's when I noticed that lots of stuff in the original instance had gone too. That said, I'm sure this has happened before when I've not used SQLCe Toolbox, so it could be co-incidental and more likely related to an app pool restart or some other event.

    I'll update here (or the issue tracker) if I have any more thoughts, but thanks for picking up on this thread in the meantime.

    (Mental note to check when I get a few mins... Following on from Niels' suggestion that it may be because of the single-user element of Ce, try using SQLCe Toolbox to export data without stopping IIS Express via WebMatrix first - so there are two connections open. Then try again, having stopped Webmatrix. See if the two connections are the cause.)

  • Johan 188 posts 380 karma points
    Apr 11, 2014 @ 15:56
    Johan
    0

    Niels: Awesome to hear that you're aware of the problem. I can understand that it is hard to nail this bug. I'm not even sure if WebMatrix was involved when i lossed my data. I usually set up the project with WebMatrix but after that i tend to use Sublime Text as editor and IISExpressManager to manage IIS Express. But again, i'm not sure how i worked when it happened.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 11, 2014 @ 16:10
    Jan Skovgaard
    0

    Hi guys

    As I think I mentioned in my former answer I very highly suspect the issue has something to do with IIS express + CE SQL.

    I've seen this on v4 and v6 installs - and also lost some data but luckily it has been on some minor private projects.

    If I setup the site as a normal IIS site I don't see the issue. If I use IIS Express it happens randomly.

    This is how I have experienced the issue and how I worked around it.

    /Jan

  • Alan Mac Kenna 147 posts 405 karma points MVP c-trib
    Apr 15, 2014 @ 14:26
    Alan Mac Kenna
    0

    I can confirm I'm also experiencing this issue on IIS Express (launched from Visual Studio) using Sql CE on Umbraco 7.1.1

  • Russell Munro 6 posts 26 karma points
    Jun 06, 2014 @ 06:29
    Russell Munro
    0

    I'm loosing data also: IIS Express (launched from Visual Studio 2013) using Sql 2008 on Umbraco 7.1.2 - 7.1.4


  • Adrian Lloyd 25 posts 125 karma points
    Sep 18, 2014 @ 17:04
    Adrian Lloyd
    0

    This happened to me today after adding TeaCommerce product nodes, members and media items. I had to restart debugging for some reason and the nodes are just gone! The media items are still in the directories and the content xml is still in the cache. I don't normally use SQL CE and I have a similar site using sqlexpress which performs prefectly.

    I'm using Umbraco version 7.1.6 assembly: 1.0.5350.25714 with SQL Compact in VS2013

    Many thanks,

    Adrian.

  • Zac 223 posts 575 karma points
    Sep 25, 2014 @ 22:24
    Zac
    0

    Noticed this issue also when playing around with a new site on Umbraco 7.1.6 with IIS Express and SQLCE. I usually use full IIS. Lost a bit of work a number of times, thorught I was going crazy. But the .sdf file simply isn't updated.

    I managed to save about an hours work (judging by the out-of-date modified date on my .sdf file) by ensuring I didn't close IIS Express, and I re-hosted the same website folder in IIS and booted it up through there whilst everything was still running in IIS Express. I have no idea why this worked.

  • wschwarte 44 posts 73 karma points
    Sep 28, 2014 @ 21:46
    wschwarte
    0

    Yes i experienced this issue too on WebMatrix with CE. I added some properties and after timeout of Umbraco i logged back in but lost most of my settings.

     

  • Funka! 398 posts 661 karma points
    Oct 24, 2014 @ 19:15
    Funka!
    2

    Pardon the long story.

    A long time ago, when I was a junior programmer, I was also an ad hoc DBA that had to keep a SQL Server Query Analyzer window open (this is an earlier version of SSMS) and manually trigger stored procedures and run other manual queries throughout the day that did Important Business Things.

    One of these business things that got triggered was to go through records one-by-one in table, process them, and then mark/flag it as processed. There was one terrible day in particular, where almost an entire day of data in the database got reset, and all of the records processed that day were un-flagged again, as if they'd never been processed. It was weird that this "reset" happened right at the end of the day, right after I closed Query Analyzer.

    So what caused this? Are you trying to guess or maybe this has happened to you before?

    The first factor in this problem was that Query Analyzer keeps a single connection open to the server the whole time you run it. You can run multiple queries or commands one after another, and they all run on the same open connection. (None of this IIS connection pooling stuff that might have saved you from such a disaster.) I wonder if this is similar to how SQL CE likes to do things.

    But the main problem was a stored procedure that day that crashed half-way through. I thought nothing of it, fixed the problem, and ran it again without a hitch. The rest of the day continued normally, running various other procedures and queries, etc. However, the stored procedure that had crashed on me earlier in the day happened to start with a BEGIN TRANSACTION. The problem is that the procedure never made it to the point where the COMMIT TRANSACTION was to have occurred. This left an open transaction in my Query Analyzer for the rest of the day (as I might have been able to see with a @@TRANCOUNT had I thought to check this) until I finally closed the program. This essentially resulted in an implicit, immediate ROLLBACK, un-doing the hours and hours of work that had been done that day since the initial "hanging" transaction was left open.

    Does this feel familiar? For example, two nights ago I lost four hours of creating document types, creating content nodes, uploading photos, composing and editing tons of text... I was constantly checking the site in my browser and really pleased at how well it was all coming along. At the end of the day, when I closed WebMatrix (or maybe it was when I restarted the site?)... well, everything reverted to the point it had been at four hours prior.

    So if I were to track this down further, I'd start by wondering whether there is a transaction opened somewhere by Umbraco that never gets committed/rolled-back properly, or whether both WebMatrix and Visual Studio (people have reported this problem happening in both) is keeping open a single, long-running implicit transaction to the SQL CE store when something else comes along and kills/rolls-back this original connection it had? I wonder if, to debug this, putting in something that monitors or logs the @@TRANCOUNT at every query and reports if it is higher than expected at any given point might help?

    I hope this long ramble may be of some help to someone. Thanks for reading!

  • Alan Mac Kenna 147 posts 405 karma points MVP c-trib
    Oct 24, 2014 @ 19:52
    Alan Mac Kenna
    1

    Interesting Funka! I hear feel frustration :) I've made sure that any sites I run when CE is involved now are using full blown IIS. I haven't had the problem since.

  • Dan 1285 posts 3917 karma points c-trib
    Feb 17, 2016 @ 21:14
Please Sign in or register to post replies

Write your reply to:

Draft