slow startup

117 views
Skip to first unread message

devm...@hotmail.com

unread,
Apr 11, 2014, 10:29:49 AM4/11/14
to rav...@googlegroups.com
hi, 

i have noticed that my app startup is slow, so i ran DotTrace and so that this below is what is taking much time

Raven.Client.Connection.HttpJsonRequest.ReadJsonInternal(Func[WebResponse])
 System.Net.HttpWebRequest.GetResponse() /////////// this line is taking much of the time


Oren Eini (Ayende Rahien)

unread,
Apr 11, 2014, 11:44:04 AM4/11/14
to ravendb
What is too much time? What is it doing? Which request? is it on a remote server?



Oren Eini

CEO

Mobile: + 972-52-548-6969

Office:  + 972-4-674-7811

Fax:      + 972-153-4622-7811





--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

devm...@hotmail.com

unread,
Apr 11, 2014, 12:15:59 PM4/11/14
to rav...@googlegroups.com
sorry if i did not detail it right, 

it is just a simple website, that i profiled with DotTrace, and when i checked for long running parts, i drilled down and saw most of website startup time is  where Raven Initialize itself.

it is a simple website, on my dev machine running latest Raven Unstable, both site and Raven are hosted on IIS.

-Windows 8 x64
-SSD Drive
-IIS 8

now i don't know if this is normal or not, hope you guys can explain

i have attached 2 screenshot i hope it helps.



Oren Eini (Ayende Rahien)

unread,
Apr 11, 2014, 12:19:31 PM4/11/14
to ravendb
What build is this?
This is running locally? 
Note that this is opening the HTTP connection to the server for the first time, so that might be it.

devm...@hotmail.com

unread,
Apr 11, 2014, 12:29:03 PM4/11/14
to rav...@googlegroups.com
thanks for reply, 

yeah it is all on my local machine, no remote calls, and the build is #2850

and you are correct this happens only the first time, but i was wondering, why it takes this much time when everything is local?

Oren Eini (Ayende Rahien)

unread,
Apr 11, 2014, 12:29:50 PM4/11/14
to ravendb
Are you doing auth?
Can you track it in Fiddler?

devm...@hotmail.com

unread,
Apr 11, 2014, 12:34:03 PM4/11/14
to rav...@googlegroups.com
i am doing authentication for the app itself and not raven does this count ?

Oren Eini (Ayende Rahien)

unread,
Apr 11, 2014, 12:36:54 PM4/11/14
to ravendb
No, it doesn't. Can you track it in Fiddler?

devm...@hotmail.com

unread,
Apr 11, 2014, 1:04:23 PM4/11/14
to rav...@googlegroups.com
Oren, everything in Fiddler look fine, except 404 error for replication destination, and i dont use replication.

any specific thing you are looking for?

Oren Eini (Ayende Rahien)

unread,
Apr 11, 2014, 1:18:47 PM4/11/14
to ravendb
No, I wanted to know the request times in Fiddler, actualy.

devm...@hotmail.com

unread,
Apr 11, 2014, 1:38:25 PM4/11/14
to rav...@googlegroups.com
Thanks Oren, all Request to raven is between 0 and 2 so that is fine, unless i am wrong


actually 

Oren Eini (Ayende Rahien)

unread,
Apr 11, 2014, 2:10:30 PM4/11/14
to ravendb
yeah, I think it is just taking time to establish the http connection

devm...@hotmail.com

unread,
Apr 11, 2014, 2:44:03 PM4/11/14
to rav...@googlegroups.com
any advise on minimizing that? specially that it is a local machine with SSD things should be really fast?

Oren Eini (Ayende Rahien)

unread,
Apr 11, 2014, 5:27:59 PM4/11/14
to ravendb

What is the actual time?

devm...@hotmail.com

unread,
Apr 11, 2014, 8:05:52 PM4/11/14
to rav...@googlegroups.com
in fiddler ?

Justin A

unread,
Apr 11, 2014, 10:13:16 PM4/11/14
to rav...@googlegroups.com
@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.

devm...@hotmail.com

unread,
Apr 12, 2014, 12:24:02 AM4/12/14
to rav...@googlegroups.com
Justin, thanks a lot really for the suggestion and advice, i really appreciate it and i infact ran a test using the server instead of IIS, and same time was consumed,so  i guess it is IIS warming up as you said. because it only happens the first time.

Justin A

unread,
Apr 16, 2014, 10:15:51 AM4/16/14
to rav...@googlegroups.com


devm...@hotmail.com

unread,
Apr 17, 2014, 5:41:57 AM4/17/14
to rav...@googlegroups.com
hahahahahah :)


On Wednesday, April 16, 2014 6:15:51 PM UTC+4, Justin A wrote:


Jahmai Lay

unread,
Apr 19, 2014, 2:36:54 AM4/19/14
to rav...@googlegroups.com

I love that the camera man and that one guy at the back were clearly waiting for the right time to get the press release photo.

On Thursday, April 17, 2014 12:15:51 AM UTC+10, Justin A wrote:


Justin A

unread,
Apr 19, 2014, 8:31:08 AM4/19/14
to rav...@googlegroups.com
@Jahmai, check out the two guys in the bottom right corner. Dude with slick haircut wants to hi5, hair-challened guy in the corner doesn't play nicely .. so they hug instead.

but Mr.SlickHairDoDude ... i saw that failed hi5 attempt. ON NATIONAL TV.

:)

Kijana Woodard

unread,
Apr 19, 2014, 9:04:52 AM4/19/14
to rav...@googlegroups.com

OK. Now I really don't want to watch.

And ummm, if you guys are watching, isn't it INTERNATIONAL TV?

--

Justin A

unread,
Apr 20, 2014, 2:32:33 AM4/20/14
to rav...@googlegroups.com
it is :) good point!
Reply all
Reply to author
Forward
0 new messages