Select to view content in your preferred language

Not all layers appear in Sample Flex Viewer when it first starts up.

2283
11
09-22-2010 12:45 PM
DavidWheelock
Frequent Contributor
I'm working on an app based on the Sample Flex Viewer 1.3.  When it first starts up, often not all of the layers appear.  However, if you close and reopen the browser a second time then they will probably all appear, and almost certainly appear if you close and reopen a third time.  If you don't close and reopen the browser then the layers cannot be made to appear.

I've spoken with others who have this problem on their SFV based sites as long as a year ago, as well.  So it is not specific to me.

It seems that there's a timeout on the layers and if the server doesn't deliver the layer to the browser before the timeout, then the browser just goes on like it doesn't matter.

Has anyone found a 100% reliable way to solve this problem and make all the layers show up the first time?
Tags (2)
0 Kudos
11 Replies
JoshCalhoun
Emerging Contributor
How many layers are in your service? One time I had a map document with a tone of layers inside and this same thing happened to me. I removed the less crucial layers and it worked without any problems after that.

Try recreating the service. (probably not the most helpfull advice but it's worth a shot)
0 Kudos
DavidWheelock
Frequent Contributor
Thanks. 

I've got multiple services involved.  And it's actually whole services that don't appear, rather than layers within a service.  I might have left that impression.  Either all the layers in a service show up or the whole service is just missing.

All the services are needed for one thing or another, so it's difficult to decide which one to leave out. 

I know that the .NET viewer can handle this, why can't Flex handle it?
Is there a way to make Flex wait on the tardy services?
0 Kudos
JoshCalhoun
Emerging Contributor
Could you post your config file? I could look at it?

thanks
0 Kudos
DavidWheelock
Frequent Contributor
Here's my app:
http://maps.oda.state.ok.us/pslv

The config file is attached.


David Wheelock    Application Specialist    david@oda.state.ok.us

Oklahoma Department of Agriculture, Food and Forestry
2800 North Lincoln Boulevard
Oklahoma City, OK 73105-4298
Phone: (405) 522-5477 FAX: (405) 522-3590
http://www.oda.state.ok.us
 
"We are usually convinced more easily by reasons we have found ourselves,
than by those which have occurred to others."
Pascal
0 Kudos
JoshCalhoun1
Emerging Contributor
Hey David,

I was able to get all of your services to work fine. Is there a particular service you were having trouble with?
0 Kudos
DavidWheelock
Frequent Contributor
Thanks Josh.

Yes, sometimes they all appear on the first try, probably soon after someone else was on the site so the services are refreshed and haven't been put to sleep by the system. 

The problem probably occurs after the services are asleep and have to be restarted, which causes a delay.  Then the Flex Viewer fails to wait long enough for the service to respond and apparently writes it off and ignores it when it arrives.  This forces the user to close the browser window and restart the browser to see all of the services, now refreshed.  On the second try all the services are almost always there.

What I want is a way to just tell the Flex viewer to WAIT for the service to respond.

David
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
David,

   If you are using ArcGIS Server 10 there is a keep service alive option in Server Manager.
0 Kudos
DavidWheelock
Frequent Contributor
Thanks Robert.

I'm at 9.3.1.  I've had so MANY problems with Desktop 10 that I had no plans to go to 10 on the Server. 

Is ArcGIS Server 10 stable without a service pack? 
Are you using it?

I thought you of all people would know of a programmatic solution to this.  I haven't seen this problem on your Flex site.  Have you had to deal with this at any point?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
David,

   The only time I have ever seen it is when I am debugging from my development machine and In debug mode sometimes the map will not show up so I stop and start debugging again and it is fine. The reason (I expect) that I don't have the issue in my development environment is my main vector map service has a min of 4 and max of 8 instances set instead of the default 1 and 2.

   I am running Server 10 and only had one big issue with my reverse proxy installation but that was because I was using an old version of Apache Server.
0 Kudos