Map Cache – Painful Process

We are undergoing painful process of caching our data.   Its been tough time and cumbersome job and ESRI Caching process is merely black box for developers.  Let me explain my issue in detail.

I’m caching with single point layer having 3 million records . I do single fused cache with ArcGIS Online scale levels and my machine is 16 GB RAM and dual core Windows Server . I use ArcGIS Server 9.3 ( NO SP1) and using 15 instances.  This caching occurs on a single box where my data is fetched from Orcale DB Server using ArcSDE . Caching is very fast for level 0 to 9. After level 10, caching takes very long time  and its fails in between during our night time. We could not identify the exact reason for the failure. When I searched the log files ( enabled ‘Verbose’) for error related  information I could not able to find single entry with world “Cache or Error” .

I have purposefully unchecked a option ” Close the box when caching is completed”  to ensure that caching is completed and successful. But still caching process is ended abruptfully.  I have following basic questions to understand the process better.

1. How to validate caching is 100% successfully completed?

2. In log files logs , Is there any way to log only caching related information in same or different file?

3. How to calculate , how much % of caching is completed?

4. When caching fails, is there any scripts or way to send out an email or notification by any means?. I using ArcCatalog for starting the caching process.

5.  During caching process when database server is down, what will be impact and error message .
6. In Update mode ‘Recreate Empty Tiles’ options says “Only tiles that are empty (have been deleted on disk), or that are new because the cache extent has changed or because new layers have been added to a multilayer cache, will be created. Old tiles will be left unchanged. ” Is that means “blank images” will be recreated when map extents and data are same.

7. What are reasons for generating ‘blank images’ for entire level

I’m looking for some good help on understanding these above points.


10 Responses to “Map Cache – Painful Process”

  1. John Says:

    I feel your pain, I’ve been caching the nation down through 9000 using the Google tiling schema for weeks. I remember having the caching fail for unexplained reasons, and after opening a case with ESRI, this was solved by always caching by feature class.

    Get or make a fc or shp with the outline of the areas you need to cache. The fewer nodes the better, think simple. Break up your area into smaller regions and cache them one at a time. I found that no more than 50 features is best, so, if you’re doing the US, you don’t need to make a grid with 200 squares in it, just use the US state boundaries. This process will also eliminate many blank tiles from getting created, which should speed up your tiling considerably.

    I would also address your # of instances. The most recent good advice I’ve read is to use (Gb of RAM)*5/4, so for my 8 Gb server 10 instances is best, and you should be able to do 20. In any case, make it an even number. Before reading this formula I, through many tests, had come up with 14 as my number, so I was pretty close to this. Take into account if other users or processes might be gumming up your server, you might need to go below 20.

    Here are the other q’s–the ones I have an answer for anyway:

    1) The Manage Map Server Cache Tiles box will say “successfully completed” or something like that. If it doesn’t, your tiles still might be fine, but run it again with “Recreate Missing Tiles” and it will clean up anything that got skipped, and shouldn’t take as long as the first time through.

    5) The impact of the db server going down will be errors in the logs, but no interruption in the caching; it will keep cranking away, even though some layer in your map may no longer be getting drawn.

    6) I don’t think blank tiles would get recreated.

    hope this helps

  2. iamlaksh1 Says:


    Thanks for your immense reply. I really appreciate your helping hands. My point layer (Well data) is feature class which accessed from Oracle DB using ArcSDE. Th point layer is for US region only and symbolized (colors) with 5 categories. Since my server has 16 GB RAM I use 15 instances. We are investigating this issue at finer lever. We tried many ways like taking one single level ( say Level 11 of ArcGIS Online scale) I tried caching with 5 instances, 15 instances etc. All the time it got failed after creating images ( 400 MB to 1GB) for some 3 hrs duration. I have tried with giving only US extents and did caching, that does not work.

    I have checked Oracle table spaces, SDE Logs etc nothing informative. Still we have raised issue India ESRI to help out us on this issue. My primary suspect is memory related issue because sometimes due to back up of Oracle database memory might be very low. Or SOC might fail. But we need to nailed down the issue so that we can prevent this in future.

    Anyways thanks for reply.

  3. John Says:

    No problem. Here are couple more things:

    –I would try direct-connect to Oracle instead of going through SDE, it’s been proven to be much faster, and it’s recommended by ESRI. The caching server will have to have Oracle installed, the same version as the db server.

    –when I say cache by feature class, I’m not talking about extents, I’m talking about the link at the very bottom of the Manage Map Server Cache Tiles dialog box that says “Update specific areas using a feature class”. This can use any polygon layer, and updates it to add a field called CACHED, which it will then populate with Yes when it’s done. If you only want to cache one part of the area, edit the layer make just that one line CACHED = No and set the rest to Yes. The checkbox (“cache areas for all features”) must be unchecked. Try this if you haven’t already, I think it’s key.

    –the 9.3.1 upgrade may fix some things that are relevant to your problems, get that ifyou can.

  4. iamlaksh1 Says:

    Thanks. Let me try this and update you.

  5. iamlaksh1 Says:


    I have taken US counties layer as polygon layer and gave as input to option provided in the Manage Map Server Cache Tiles. This creates images successfully, but after some FID’s process terminated abruptly which I cannot find any reason.

    I have used only 2 instances for caching. How to find the cause

    Have you used scripting for map cache?. I want to catch the exact error when caching is terminated.

  6. John Says:

    Hmm, not sure about this. Does it fail and close the status popup window, or just stop and give an error such as “all server contexts failed”?

    You said things only fail when trying to cache scale level 10, right? Are there certain layers in your mxd that don’t appear until that scale? Maybe that’s something you can look into?

    I have used Python scripts to fire off cache jobs, but I don’t like to because I don’t know how to replicate the status bar and popup window, or how to get any confirmation that the cache was successfully created. If you know how to code these things, let me know! If you want I can send you a working script.

  7. iamlaksh1 Says:

    My caching process fails and close the status pop window . Level 0 to 10 no issues, all iamges are cached with 15 instances in 3 hrs. From Level 11 to 15 I use feature class option. I have edited US counties shape file as such sits on my wells layer and gave input. I starts process and creating images but failed in between. I cannot find what is reason for this.

  8. cwhite Says:

    Most of the errors I ran into were related to 1 or 2 ArcSDE layers in an Oracle DB that for some reason where idle timing out. I exported them to File Geodatabases (on a different disk) and the SOC idle timeout seemed to go away. We used the analyze feature in ArcMap to determine our problem layers. It took like 10 minutes with those layers on Oracle, but 10 seconds on disk.

    That did not stop requiring me to babysit the process, as it will spontaneously determine that it is complete.

    We use the java version of ArcGIS Server and the java manager stack traces are found in this directory: C:\Program Files\ArcGIS\java\manager\service\logs. They have been more helpful than the logs from the web page, although not a silver bullet.

  9. iamlaksh1 Says:


    Thanks for response. I am caching only one single layer and geometries were fine . Still am doing some R&D on this. Anyway thanks for chipping in.

  10. arcobjects Says:

    i want to learn arc objects, please give me the suggetions.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: