Select to view content in your preferred language

Build 2500 Out of Memory Errors on Trimbles

1221
9
07-27-2011 06:18 PM
PeterTimmers
Frequent Contributor
When posting updates to a server we're regularly getting "Out of Memory" errors.

I've tried to report this problem before to our resellers when we had build 2475 and we were told to try build 2500.

We've got 40+ trimble nomads with mobile 2500 collecting points with photo raster field.  It only happens every now and then. But it's enough that we lose data.  Exporting to a shapefile isn't helpful either.    We try to keep photo size to below 800x600.

I've talked about the problem before on the forums.  Now it's build 2500 and it's still not fixed.  

Has anyone had this happen to them?
0 Kudos
9 Replies
AkhilParujanwala
Regular Contributor
I have now reached 2400+ points in my feature class and I am experiencing this problem too. I noticed that when my Laptop is rendering 1000+ points it will crash giving the same error you get.

But when my Tablet PC was rendering those same 1000+ points it will still ok.

My laptop is running XP with 1GB of ram.
My tablet pc is running Win 7 with 2GB of ram.

I did my performance tests last week, and did two tests. The first 1000+ points having both Laptop and Tablet PC running and collecting points, the laptop did crash giving the same error. While the Tablet PC continued to collect points.

I did the second test, which is in addition to the already existing 1000+ points in the feature class. The test was the same setup as before, and once the Laptop created around 700+ points, it crashed. The Tablet PC created roughly 300+ points when the laptop crashed, and the tablet pc was still running fine.

I still want to run some more performance tests but, I am running low on time.

I am also using the ArcGIS Mobile WPF application, but I have coded my own data collection and synchronization with the server code. I have an auto collect button, that will collect a point on the map every 3-4 seconds and will sync each point after the point is made. The tablet pc has a slower CPU and wireless internet connection and it takes roughly 6-8 seconds to make a point.

As the number of features increases in the featureclass, the tablet pc becomes slower to create points and sync, roughly 10-11 seconds once there are over 1000+ points in the featureclass. However, the laptop with a faster CPU and LAN connection to the network was able to maintain a stable 3-4 seconds point creation with sync.

I am not sure if it is the CPU or internet connection that causes the tablet pc to slow down in the data collection process with sync. I am not sure why the laptop crashes around the 1000+ points mark, as both Tablet PC and Laptop are running and collecting points.

* Yes my featureclass has a Raster field for photos and very few points actually contain a raster images with the point. When there is a photo taken, they are at a high resolution, 1600x1200.

If time prevails, I will try to determine if it is a CPU + Ram issue or a Internet Connection speed issue that causes this out of memory error.

I am not sure why you are losing data when your application crashes, it shouldn't be a corruption issue. As far as I understand, if your project file gets corrupted you are likely to lose all data point collected by that one particular nomad. But if a normal error occurs, the data should be ok, and just manually post updates.

In addition, disable team tracking may help with you sync issue. I noticed that my application does not like Tracking to be turned on when auto collection mode it turned on. This causes massive sync issues.

So if you turn off tracking, and enable the sync to occur when data changes, your problem should be solved in terms of not losing data when ArcGIS Mobile crashes.

Sorry for the long post.
0 Kudos
PeterTimmers
Frequent Contributor
Hi again Akhil.

1600x1200 photos!! I'm amazed they work.  

I'm betting we'll see attachments in 10.1.  (maybe it's hoping)

You could code up a web service that takes the photos independently and writes their filename in the feature class... (goes against my the out-of-the-box with minimal code strategy).

That's quite a reasonable number of points before it slows down/crashes...   we get that slowing down even earlier on the trimbles.

We have a photo on each point and the users wanted to be able to "get data" what points have already been done (reasonable enough request right?!).   Can you imagine that when they had close to 1000 points, each with a photo, over 3G!!  I now have a bit of dotnet which strips the raster field into a file and puts it's filename in the feature class.... that works much better.

I'd love not to have to do photos.

Oh our guys currently don't have internet when in the field (i.e. in disaster zones with dead 3G towers quite often).  We might have to change that somehow though.
0 Kudos
AkhilParujanwala
Regular Contributor
Hi Peter,

Very interesting, only 1% of my points are expected to have images (photos) taken by the Panasonic U1 tablet pc.

Right now all images are being saved to the database when synced. But my Web GIS Programmers is unable to see the photo attached to those points. He can identify them, see that the field contains a raster image, but can't open it to see the image. He requires an URL to the image, but the image name is a random string in the database with no URL.

We are unsure if the web API are able to handle this kind of image. He also told me to used attachments instead, but I can't do that yet, but this may make it easier for him to see the image on the web map.

My application is also used for emergency situations, where we are likely to have internet connection for most incidents, well that's the goal at least. We want to see all points collected in the field in a near live situation with internet in our new web map app. So far it is working, aside from seeing the image.

We are also considering that a new service will be created for each incident, rather than using one service for all incidents. In addition, we thought that if you use one service for all incidents, you can archive the completed incident to another featureclass and purge all data in the active featureclass. This strategy may be adopted to reduce issues of sync.

We are also using a 3G network for each tablet pc.
0 Kudos
PeterTimmers
Frequent Contributor
As far as I know the web api's can't handle raster fields.   (please someone tell me I'm wrong)... and yes attachments might answer our problem.

I've attached some partial code on how to export to jpg.  I store the resulting jpg's name in a field but you could construct that on the fly.  I also empty the raster field.  And I apologize for my messy code...  There are references in that code to functions that aren't in there.

There's probably more in there than you need.

We've got quite a few mobile projects.... some do overlap, using the same service.  Some apps use multiple services.

Dim pValue As IRasterValue
            Dim pRasterDataset As IRasterDataset3
            Dim pWorkspaceFactory As IWorkspaceFactory
            Dim pWorkspace As IWorkspace
            Dim pSaveAs As ISaveAs

            Dim pPropSet As IPropertySet = New PropertySetClass()
            With pPropSet
                .SetProperty("Server", My.Settings.Server)
                .SetProperty("Instance", My.Settings.Instance)
                .SetProperty("Database", My.Settings.Database)
                .SetProperty("AUTHENTICATION_MODE", My.Settings.AUTHENTICATION_MODE)
                .SetProperty("USER", My.Settings.USER)
                .SetProperty("PASSWORD", My.Settings.PASSWORD)
                .SetProperty("version", "sde.DEFAULT")
            End With
            Dim pSDEWorkspace As IWorkspace
            Dim pSDEWorkspaceFactory As New SdeWorkspaceFactory
            pSDEWorkspace = pSDEWorkspaceFactory.Open(pPropSet, 0)

            Dim pFeatureWorkspace As IFeatureWorkspace = pSDEWorkspace
            Dim pFeatureClass As IFeatureClass = pFeatureWorkspace.OpenFeatureClass(My.Settings.FCName)
            Dim pFeatcursor As IFeatureCursor = pFeatureClass.Search(Nothing, True)
            Dim pfeature As IFeature = pFeatcursor.NextFeature

            Dim pFlds As IFields = pFeatureClass.Fields
            Dim rasterfieldidx = FindCheckField(My.Settings.RasterFieldName, esriFieldType.esriFieldTypeRaster, pFlds)
            Dim datefieldidx = FindCheckField(My.Settings.DateField, esriFieldType.esriFieldTypeDate, pFlds)
            Dim photofileidx = FindCheckField(My.Settings.RasterPhotoLink, esriFieldType.esriFieldTypeString, pFlds)
            Dim globalididx = FindCheckField("GlobalID", esriFieldType.esriFieldTypeGlobalID, pFlds)

            Dim fcount As Integer = 0
            While Not pfeature Is Nothing
                Try
                    'Export Raster
                    If Not pfeature.Value(rasterfieldidx) Is System.DBNull.Value Then
                        pValue = pfeature.Value(rasterfieldidx)
                        pRasterDataset = pValue.RasterDataset
                        pWorkspaceFactory = New RasterWorkspaceFactoryClass
                        pWorkspace = pWorkspaceFactory.OpenFromFile(My.Settings.DestDir, 0)
                        pSaveAs = pRasterDataset

                        Dim filename As String = My.Settings.DestDir & "\" + Mid(pfeature.Value(globalididx), 2, Len(pfeature.Value(globalididx)) - 2) + ".jpg"
                        If pSaveAs.CanSaveAs("JPEG") And System.IO.File.Exists(filename) = False Then
                            pSaveAs.SaveAs(filename, pWorkspace, "JPEG")
                            If IO.File.Exists(filename) Then
                                'Add filename
                                pfeature.Value(photofileidx) = IO.Path.GetFileName(filename)
                                'Clear Raster Field
                                pfeature.Value(rasterfieldidx) = System.DBNull.Value
                                pfeature.Store()
                                fcount += 1
                            End If
                        ElseIf System.IO.File.Exists(filename) Then
                            pfeature.Value(rasterfieldidx) = System.DBNull.Value
                            pfeature.Store()
                        End If
                    End If
                Catch ex1 As System.InvalidCastException
                    m_evlog.WriteEntry(ex1.Message + " CONTINUING")
                Catch ex As Exception
                    m_evlog.WriteEntry("Exception: " & ex.Message)
                End Try
                pfeature = pFeatcursor.NextFeature
            End While
0 Kudos
AkhilParujanwala
Regular Contributor
Thanks for the information regarding the technique you are using.

So far raster fields are not supported by web api's, at least my web programmer says so.

I just want to make sure I understand what you are doing.
Your taking your raster field, which contains a raster, then copying it, turning into a jpeg that is stored on the server, and then copy the filename to a field in the featureclass to be viewed?

Thanks!
0 Kudos
PeterTimmers
Frequent Contributor
You've got it.
0 Kudos
NickDeMerchant
Emerging Contributor
Peter,

I am trying to achieve the same thing.  We have users collecting pictures on our Trimble JUNO device and we would like to view them in our Flex web viewer.  As you know, this isn't feasible.  I would like to learn more on what you are doing and how I can write it out to a Jpeg on the server and create a hyperlink on the feature class.

Any info would be greatly appreciated.  I see you have some arcobjects code.  When and where is this run.  Should I be able to utilize this code easily to do the same thing?

Thanks,

Nick



As far as I know the web api's can't handle raster fields.   (please someone tell me I'm wrong)... and yes attachments might answer our problem.

I've attached some partial code on how to export to jpg.  I store the resulting jpg's name in a field but you could construct that on the fly.  I also empty the raster field.  And I apologize for my messy code...  There are references in that code to functions that aren't in there.

There's probably more in there than you need.

We've got quite a few mobile projects.... some do overlap, using the same service.  Some apps use multiple services.

Dim pValue As IRasterValue
            Dim pRasterDataset As IRasterDataset3
            Dim pWorkspaceFactory As IWorkspaceFactory
            Dim pWorkspace As IWorkspace
            Dim pSaveAs As ISaveAs

            Dim pPropSet As IPropertySet = New PropertySetClass()
            With pPropSet
                .SetProperty("Server", My.Settings.Server)
                .SetProperty("Instance", My.Settings.Instance)
                .SetProperty("Database", My.Settings.Database)
                .SetProperty("AUTHENTICATION_MODE", My.Settings.AUTHENTICATION_MODE)
                .SetProperty("USER", My.Settings.USER)
                .SetProperty("PASSWORD", My.Settings.PASSWORD)
                .SetProperty("version", "sde.DEFAULT")
            End With
            Dim pSDEWorkspace As IWorkspace
            Dim pSDEWorkspaceFactory As New SdeWorkspaceFactory
            pSDEWorkspace = pSDEWorkspaceFactory.Open(pPropSet, 0)

            Dim pFeatureWorkspace As IFeatureWorkspace = pSDEWorkspace
            Dim pFeatureClass As IFeatureClass = pFeatureWorkspace.OpenFeatureClass(My.Settings.FCName)
            Dim pFeatcursor As IFeatureCursor = pFeatureClass.Search(Nothing, True)
            Dim pfeature As IFeature = pFeatcursor.NextFeature

            Dim pFlds As IFields = pFeatureClass.Fields
            Dim rasterfieldidx = FindCheckField(My.Settings.RasterFieldName, esriFieldType.esriFieldTypeRaster, pFlds)
            Dim datefieldidx = FindCheckField(My.Settings.DateField, esriFieldType.esriFieldTypeDate, pFlds)
            Dim photofileidx = FindCheckField(My.Settings.RasterPhotoLink, esriFieldType.esriFieldTypeString, pFlds)
            Dim globalididx = FindCheckField("GlobalID", esriFieldType.esriFieldTypeGlobalID, pFlds)

            Dim fcount As Integer = 0
            While Not pfeature Is Nothing
                Try
                    'Export Raster
                    If Not pfeature.Value(rasterfieldidx) Is System.DBNull.Value Then
                        pValue = pfeature.Value(rasterfieldidx)
                        pRasterDataset = pValue.RasterDataset
                        pWorkspaceFactory = New RasterWorkspaceFactoryClass
                        pWorkspace = pWorkspaceFactory.OpenFromFile(My.Settings.DestDir, 0)
                        pSaveAs = pRasterDataset

                        Dim filename As String = My.Settings.DestDir & "\" + Mid(pfeature.Value(globalididx), 2, Len(pfeature.Value(globalididx)) - 2) + ".jpg"
                        If pSaveAs.CanSaveAs("JPEG") And System.IO.File.Exists(filename) = False Then
                            pSaveAs.SaveAs(filename, pWorkspace, "JPEG")
                            If IO.File.Exists(filename) Then
                                'Add filename
                                pfeature.Value(photofileidx) = IO.Path.GetFileName(filename)
                                'Clear Raster Field
                                pfeature.Value(rasterfieldidx) = System.DBNull.Value
                                pfeature.Store()
                                fcount += 1
                            End If
                        ElseIf System.IO.File.Exists(filename) Then
                            pfeature.Value(rasterfieldidx) = System.DBNull.Value
                            pfeature.Store()
                        End If
                    End If
                Catch ex1 As System.InvalidCastException
                    m_evlog.WriteEntry(ex1.Message + " CONTINUING")
                Catch ex As Exception
                    m_evlog.WriteEntry("Exception: " & ex.Message)
                End Try
                pfeature = pFeatcursor.NextFeature
            End While
0 Kudos
NickDeMerchant
Emerging Contributor
Hi Akhil,

Just wondering how you went about

"I am also using the ArcGIS Mobile WPF application, but I have coded my own data collection and synchronization with the server code. I have an auto collect button, that will collect a point on the map every 3-4 seconds and will sync each point after the point is made."

Would you be able to share any of your code on this?  I want to be able to create a point feature automatically on a timer.  Out of the box does not seem to allow me to stream point data.

Thanks for any info,

Nick

I have now reached 2400+ points in my feature class and I am experiencing this problem too. I noticed that when my Laptop is rendering 1000+ points it will crash giving the same error you get.

But when my Tablet PC was rendering those same 1000+ points it will still ok.

My laptop is running XP with 1GB of ram.
My tablet pc is running Win 7 with 2GB of ram.

I did my performance tests last week, and did two tests. The first 1000+ points having both Laptop and Tablet PC running and collecting points, the laptop did crash giving the same error. While the Tablet PC continued to collect points.

I did the second test, which is in addition to the already existing 1000+ points in the feature class. The test was the same setup as before, and once the Laptop created around 700+ points, it crashed. The Tablet PC created roughly 300+ points when the laptop crashed, and the tablet pc was still running fine.

I still want to run some more performance tests but, I am running low on time.

I am also using the ArcGIS Mobile WPF application, but I have coded my own data collection and synchronization with the server code. I have an auto collect button, that will collect a point on the map every 3-4 seconds and will sync each point after the point is made. The tablet pc has a slower CPU and wireless internet connection and it takes roughly 6-8 seconds to make a point.

As the number of features increases in the featureclass, the tablet pc becomes slower to create points and sync, roughly 10-11 seconds once there are over 1000+ points in the featureclass. However, the laptop with a faster CPU and LAN connection to the network was able to maintain a stable 3-4 seconds point creation with sync.

I am not sure if it is the CPU or internet connection that causes the tablet pc to slow down in the data collection process with sync. I am not sure why the laptop crashes around the 1000+ points mark, as both Tablet PC and Laptop are running and collecting points.

* Yes my featureclass has a Raster field for photos and very few points actually contain a raster images with the point. When there is a photo taken, they are at a high resolution, 1600x1200.

If time prevails, I will try to determine if it is a CPU + Ram issue or a Internet Connection speed issue that causes this out of memory error.

I am not sure why you are losing data when your application crashes, it shouldn't be a corruption issue. As far as I understand, if your project file gets corrupted you are likely to lose all data point collected by that one particular nomad. But if a normal error occurs, the data should be ok, and just manually post updates.

In addition, disable team tracking may help with you sync issue. I noticed that my application does not like Tracking to be turned on when auto collection mode it turned on. This causes massive sync issues.

So if you turn off tracking, and enable the sync to occur when data changes, your problem should be solved in terms of not losing data when ArcGIS Mobile crashes.

Sorry for the long post.
0 Kudos
PeterTimmers
Frequent Contributor
I guess you could take that arcobjects code and place it in a windows service.  Currently (because I'm hoping esri will fix this problem with 10.1) I'm just running it as a bit of scheduled windows form minimized (horrible - I'm over this problem).  It works. 

It does require an info or editor licence and I'm running it on a server.  You can run it anywhere as long as you have access to the final file destination. 

Once it's spat out the file and it's got the filename in a field in sde I just construct the rest of the url in the web app.

The only annoying thing about the whole process is the need for an info or editor licence (floating - sometimes not available).
0 Kudos