Btw, if I delete the session cookie in my browser, the progress query starts working.

Steve
On 1/3/2013 5:15 PM, Steve Carton wrote:
Hi Guys,

I'm back at this problem after the holidays - and I hope all of you had a nice time and a happy new year.

I'm beginning to wonder if this is a Marklogic issue at all, but I'm going to post my latest tests and see if these cause someone to think of an answer. Failing that, I'll try and put the code out for your consumption.

I discovered some interesting things. The way this application works (it is a browser application) is that the user first comes to a "Dashboard" that gives them some data statistics and some options. It also presents a number of content editions. The user can click on an edition and they get more stats and some edition options. One of the edition options is to perform my cross-reference analysis. If the user clicks on that link, the browser is directed to a URL that controls the cross-reference analysis. From there, the user can start the analysis - clicking the start button triggers an Ajax call to ML to run the analysis and then subsequent Ajax calls for the progress. It is these subsequent calls that lock up.

What I've found is that if I start a browser and point it at the URL for the cross-reference analysis page, and then start the analysis, it all works fine - the analysis call is made, the analysis starts and the subsequent progress requests are made, processed and the progress bar is updated. It is only if I first go to that opening dashboard that the progress calls wait. And, if I first go to the dashboard and then to the cross-reference analyzer and start it, although the Ajax calls to update the progress wait, I can open a different browser and enter the URL to the progress XQY directly and that works.

So this had me believing that one of two things is happening - either the browser is not clearing some object or another from the dashboard that is preventing the progress Ajax requests from being sent to the server, or that there is some kind of session-related block in Marklogic that is somehow set and not cleared when the dashboard is accessed, but not set when the cross-reference analyzer is loaded directly.

So I installed a TCP/IP sniffer to look at the requests being sent to the server and as near as I can tell, the progress requests are in fact going to the server even though a response is not being sent back.

Is there such a think as a session lock? Or a session query limit?


On 12/20/2012 7:17 PM, Charles Greer wrote:
Hi Steve,

Did you verify Geert's guess that the status query might be running in update mode?

What you're describing now is rather perplexing, you might want to share some code; maybe the issue it can be reproduced.

Charles


On 12/20/2012 03:33 PM, Steve Carton wrote:
Geert, Charles,

To test this, I removed logging entirely so that the main query now just loops over all of the cross reference elements.


Some of these elements get an update made to them - a flag if you will indicating that the cross reference target doesn't exist - cannot be resolved.


But even with creation of the log elements removed, the second, progress query waits for the first one to complete.


Steve

====================================================


'stitching': or just use search:search on that log collection to scroll through the log page by page. If you have a range index on some dateTime field, you should be able to sort it as well..

Cheers,

Geert

*Van:* [email protected] [mailto: [email protected]] *Namens *Charles Greer *Verzonden:* woensdag 19 december 2012 22:25 *Aan:* [email protected] *Onderwerp:* Re: [MarkLogic Dev General] Fwd: Re: running two queries at the same time

Hello Steve,

Geert's suggestion might avoid this issue entirely. MarkLogic is much better at inserting a lot of small documents than appending to a big one. I think you'll end up with a lot less disk IO by avoiding an operation that updates a big document lots of times.

If you need to return the whole log as one document you might provide an endpoint that stitches together a lot of documents into one wrapper.

Hope that helps,

Charles

On 12/19/2012 07:36 AM, Steve Carton wrote:

Geert -

They are two separate .xqy files. The big one does update the log document. The small one has an option to return log information or to return just progress.

So I removed the option to return the log data. Now it simply returns the contents of the server fields. But it still waits.

_______________________________________________

General mailing list

[email protected]

http://developer.marklogic.com/mailman/listinfo/general



_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

--
Charles Greer
Senior Engineer
MarkLogic Corporation
[email protected]
Phone: +1 707 408 3277
www.marklogic.com


_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

--
/Steve/


_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

--
/Steve/
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to