{"action":"created","issue":{"url":"https://api.github.com/repos/marklogic/marklogic-samplestack/issues/395","labels_url":"https://api.github.com/repos/marklogic/marklogic-samplestack/issues/395/labels{/name}","comments_url":"https://api.github.com/repos/marklogic/marklogic-samplestack/issues/395/comments","events_url":"https://api.github.com/repos/marklogic/marklogic-samplestack/issues/395/events","html_url":"https://github.com/marklogic/marklogic-samplestack/issues/395","id":52482736,"number":395,"title":"JVM/Spring warm-up?","user":{"login":"laurelnaiad","id":4078946,"avatar_url":"https://avatars.githubusercontent.com/u/4078946?v=3","gravatar_id":"","url":"https://api.github.com/users/laurelnaiad","html_url":"https://github.com/laurelnaiad","followers_url":"https://api.github.com/users/laurelnaiad/followers","following_url":"https://api.github.com/users/laurelnaiad/following{/other_user}","gists_url":"https://api.github.com/users/laurelnaiad/gists{/gist_id}","starred_url":"https://api.github.com/users/laurelnaiad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurelnaiad/subscriptions","organizations_url":"https://api.github.com/users/laurelnaiad/orgs","repos_url":"https://api.github.com/users/laurelnaiad/repos","events_url":"https://api.github.com/users/laurelnaiad/events{/privacy}","received_events_url":"https://api.github.com/users/laurelnaiad/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/marklogic/marklogic-samplestack/labels/fix","name":"fix","color":"eb6420"},{"url":"https://api.github.com/repos/marklogic/marklogic-samplestack/labels/minor","name":"minor","color":"207de5"},{"url":"https://api.github.com/repos/marklogic/marklogic-samplestack/labels/Task","name":"Task","color":"0052cc"}],"state":"open","locked":false,"assignee":{"login":"grechaw","id":382672,"avatar_url":"https://avatars.githubusercontent.com/u/382672?v=3","gravatar_id":"","url":"https://api.github.com/users/grechaw","html_url":"https://github.com/grechaw","followers_url":"https://api.github.com/users/grechaw/followers","following_url":"https://api.github.com/users/grechaw/following{/other_user}","gists_url":"https://api.github.com/users/grechaw/gists{/gist_id}","starred_url":"https://api.github.com/users/grechaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grechaw/subscriptions","organizations_url":"https://api.github.com/users/grechaw/orgs","repos_url":"https://api.github.com/users/grechaw/repos","events_url":"https://api.github.com/users/grechaw/events{/privacy}","received_events_url":"https://api.github.com/users/grechaw/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/marklogic/marklogic-samplestack/milestones/2","labels_url":"https://api.github.com/repos/marklogic/marklogic-samplestack/milestones/2/labels","id":640443,"number":2,"title":"8.0-1","description":null,"creator":{"login":"laurelnaiad","id":4078946,"avatar_url":"https://avatars.githubusercontent.com/u/4078946?v=3","gravatar_id":"","url":"https://api.github.com/users/laurelnaiad","html_url":"https://github.com/laurelnaiad","followers_url":"https://api.github.com/users/laurelnaiad/followers","following_url":"https://api.github.com/users/laurelnaiad/following{/other_user}","gists_url":"https://api.github.com/users/laurelnaiad/gists{/gist_id}","starred_url":"https://api.github.com/users/laurelnaiad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurelnaiad/subscriptions","organizations_url":"https://api.github.com/users/laurelnaiad/orgs","repos_url":"https://api.github.com/users/laurelnaiad/repos","events_url":"https://api.github.com/users/laurelnaiad/events{/privacy}","received_events_url":"https://api.github.com/users/laurelnaiad/received_events","type":"User","site_admin":false},"open_issues":108,"closed_issues":32,"state":"open","created_at":"2014-04-25T15:53:06Z","updated_at":"2015-01-27T19:00:28Z","due_on":null,"closed_at":null},"comments":16,"created_at":"2014-12-19T13:29:16Z","updated_at":"2015-01-27T20:34:09Z","closed_at":null,"body":"In e2e tests, I have a \"dummy\" request that gives the Java middle-tier a poke in order to warm it up. This helps avoid timeouts.\r\n\r\nIn the actual application, we have no such option. Let's discuss what we could do around the tail end of the bootrun task to get the JVM/Spring into memory and ready to respond to requests, so that we can bring down the browser tineout. I've just set the browser timeout to 30 seconds, but for a local app (or really any app that's not having actual internet connectivity problems) that shouldn't be necessary."},"comment":{"url":"https://api.github.com/repos/marklogic/marklogic-samplestack/issues/comments/71722465","html_url":"https://github.com/marklogic/marklogic-samplestack/issues/395#issuecomment-71722465","issue_url":"https://api.github.com/repos/marklogic/marklogic-samplestack/issues/395","id":71722465,"user":{"login":"grechaw","id":382672,"avatar_url":"https://avatars.githubusercontent.com/u/382672?v=3","gravatar_id":"","url":"https://api.github.com/users/grechaw","html_url":"https://github.com/grechaw","followers_url":"https://api.github.com/users/grechaw/followers","following_url":"https://api.github.com/users/grechaw/following{/other_user}","gists_url":"https://api.github.com/users/grechaw/gists{/gist_id}","starred_url":"https://api.github.com/users/grechaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grechaw/subscriptions","organizations_url":"https://api.github.com/users/grechaw/orgs","repos_url":"https://api.github.com/users/grechaw/repos","events_url":"https://api.github.com/users/grechaw/events{/privacy}","received_events_url":"https://api.github.com/users/grechaw/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T20:34:09Z","updated_at":"2015-01-27T20:34:09Z","body":"Not at all straightforward how to accomplish this in the Java application or in the gradle tasks.\r\n\r\nThe last thing the Spring container does is fire up the web server and hand control of the application over.\r\nThe last thing bootRun does is invoke the Spring app and block.\r\n\r\nSo in order to hook into either of these places I'd have to deal with concurrency in a way not supported by either the gradle process or the Spring container.   I figured out how to hook into the Spring container, but the point at which I can inject code is before the webserver is available, and I just get a socket error.\r\nI'm at a loss how to proceed.\r\n\r\nCould the browser send a dummy search as part of ITS startup?  It seems that this would accomplish the same thing, and I can't figure out at all where I'd put a call in.  \r\n\r\nIncidently I found a place where the request time is particularly bad -- after running dbconfigure, there's something about a first-time extension run that is very slow in MarkLogic.  It could be that the root cause of the first hit is because of extension evaluations (program cache?) rather than search caches as I previously thought.  Not that it matters..."}}