@devm
1. Are you developing a website on your localhost using VisualStudio? (assumption: YES)
2. Are you using a relatively recent version of RavenDB. eg. 2.5? (assumption: YES).
3. RavenDB is running on your -local- machine under IIS (assumption: YES).
ok. if I've guessed this right .. then .. why are you running RavenDB under IIS on your ----local----- machine where you are doing your development? IMO, I would never do this and just use the Raven.Server.Exe (pro tips on this here:
http://ravendb.net/kb/22/using-ravendb-in-day-to-day-development) - which means this gives you easier access to what is going on. ie -> you can see all the api hits to the RavenDB server to confirm what you are trying to do, is right/wrong. U can reset all your data (LOVE THAT and I USE THAT ALL THE TIME! CAPS LOCK FTW!!!) plus, you don't need IIS to be installed, running, setup up for ravendb, etc. etc. etc.
Please use Raven.Server.Exe for localhost dev, IMO.
Now .. if you cannot run raven.server.exe on your local machine for reasons that would make me cry and you're stuck using IIS on your own machine OR another one ... is it possible that IIS has to 'warm up' with your first request? Or there's some underlying piece of infrastructure that needs to 'warm up' betwee you and the RavenDb Server?
As you can see - i'm wondering if the issue is really RavenDb related, but something else that is network related in some direct or indirect way.