query timeout bug

View: New views
4 Messages — Rating Filter:   Alert me  

query timeout bug

by Andrew Hart CEMS Staff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I recently tried to use
- query-timeout
                this attribute sets the maximum amount of time
(expressed in
                milliseconds) that the query can take before it is killed..
from conf.xml to limit queries to 5 minutes or less.  This was because
some of our scripts get data from an external source through a proxy,
either of which can take forever to respond...Anyway it worked well
apart from the fact that it randomly kills xqueries immediately (and
gives the query timed out error).

Anyone else get this?  I am on Solaris 10 java 1.5.0_01 eXist says
8849-20090416 but this may be wrong as I have to remember to type it in
before build.sh

I am asking because it could be something local - like our http proxy -
causing the problem.


This email was independently scanned for viruses by McAfee anti-virus software and none were found
------------------------------------------------------------------------------
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: query timeout bug

by Michael Sokolov-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I had a similar issue (1.3-dev version on linux).  Queries would randomly
die immediately, with the message that they had taken too long: sorry don't
have the details, but it really did sound like they had been killed
explicitly by the watchdog. I had set the watchdog timer to 30 seconds.

-Mike

> -----Original Message-----
> From: Andrew Hart CEMS Staff [mailto:Andrew2.Hart@...]
> Sent: Tuesday, June 30, 2009 6:03 AM
> To: exist
> Subject: [Exist-open] query timeout bug
>
> I recently tried to use
> - query-timeout
>                 this attribute sets the maximum amount of
> time (expressed in
>                 milliseconds) that the query can take before
> it is killed..
> from conf.xml to limit queries to 5 minutes or less.  This
> was because some of our scripts get data from an external
> source through a proxy, either of which can take forever to
> respond...Anyway it worked well apart from the fact that it
> randomly kills xqueries immediately (and gives the query
> timed out error).
>
> Anyone else get this?  I am on Solaris 10 java 1.5.0_01 eXist says
> 8849-20090416 but this may be wrong as I have to remember to
> type it in before build.sh
>
> I am asking because it could be something local - like our
> http proxy - causing the problem.
>
>
> This email was independently scanned for viruses by McAfee
> anti-virus software and none were found
> --------------------------------------------------------------
> ----------------
> _______________________________________________
> Exist-open mailing list
> Exist-open@...
> https://lists.sourceforge.net/lists/listinfo/exist-open
>


------------------------------------------------------------------------------
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: query timeout bug

by Andrew Hart CEMS Staff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK I reproduced it in 9181 too

The query exceeded the predefined timeout and has been killed.stattime:
1246370822671 elapsed: 573785

It seems if you click around a bit and then wait a good while then your
next click gets the error.
from the log
2009-06-30 15:16:36,468 [P1-9] WARN  (XQueryWatchDog.java [proceed]:123)
- Query exceeded predefined timeout (573,785 ms.):
2009-06-30 15:16:36,472 [P1-9] DEBUG (RESTServer.java [doGet]:428) - The
query exceeded the predefined timeout and has been
killed.1246370822671 elapsed: 573785 [at line 14, column 2]
In call to function:
        ui:pageHeader(item()*) [36:18]
org.exist.xquery.TerminatedException$TimeoutException: The query
exceeded the predefined timeout and has been killed.1246370
822671 elapsed: 573785 [at line 14, column 2]
In call to function:
        ui:pageHeader(item()*) [36:18]
        at org.exist.xquery.XQueryWatchDog.proceed(XQueryWatchDog.java:126)
        at org.exist.xquery.XQueryWatchDog.proceed(XQueryWatchDog.java:132)
        at org.exist.xquery.XQueryContext.proceed(XQueryContext.java:1817)
        at
org.exist.xquery.ElementConstructor.eval(ElementConstructor.java:219)
        at
org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:60)
        at org.exist.xquery.PathExpr.eval(PathExpr.java:249)
        at
org.exist.xquery.UserDefinedFunction.eval(UserDefinedFunction.java:133)
        at
org.exist.xquery.DynamicCardinalityCheck.eval(DynamicCardinalityCheck.java:71)
        at org.exist.xquery.DynamicTypeCheck.eval(DynamicTypeCheck.java:61)
        at org.exist.xquery.FunctionCall.evalFunction(FunctionCall.java:268)
        at org.exist.xquery.FunctionCall.eval(FunctionCall.java:201)
        at
org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:60)
        at org.exist.xquery.PathExpr.eval(PathExpr.java:249)
        at org.exist.xquery.EnclosedExpr.eval(EnclosedExpr.java:70)
        at
org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:60)
        at org.exist.xquery.PathExpr.eval(PathExpr.java:249)
        at
org.exist.xquery.ElementConstructor.eval(ElementConstructor.java:266)
        at
org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:60)
        at org.exist.xquery.PathExpr.eval(PathExpr.java:249)
        at
org.exist.xquery.ElementConstructor.eval(ElementConstructor.java:266)
        at
org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:60)
        at org.exist.xquery.PathExpr.eval(PathExpr.java:249)
        at
org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:60)
        at org.exist.xquery.LetExpr.eval(LetExpr.java:205)
        at org.exist.xquery.LetExpr.eval(LetExpr.java:203)
        at org.exist.xquery.LetExpr.eval(LetExpr.java:203)
        at org.exist.xquery.LetExpr.eval(LetExpr.java:203)
        at
org.exist.xquery.BindingExpression.eval(BindingExpression.java:158)
        at
org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:60)
        at org.exist.xquery.PathExpr.eval(PathExpr.java:249)
        at
org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:60)
        at org.exist.xquery.XQuery.execute(XQuery.java:226)
        at org.exist.xquery.XQuery.execute(XQuery.java:188)
        at org.exist.http.RESTServer.executeXQuery(RESTServer.java:1178)
        at org.exist.http.RESTServer.doGet(RESTServer.java:424)
        at org.exist.http.servlets.EXistServlet.doGet(EXistServlet.java:323)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
        at
org.exist.http.urlrewrite.PassThrough.doRewrite(PassThrough.java:44)
        at
org.exist.http.urlrewrite.XQueryURLRewrite.doFilter(XQueryURLRewrite.java:337)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
        at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
        at org.mortbay.http.HttpServer.service(HttpServer.java:909)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
        at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
        at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

Michael Sokolov wrote:

> I had a similar issue (1.3-dev version on linux).  Queries would randomly
> die immediately, with the message that they had taken too long: sorry don't
> have the details, but it really did sound like they had been killed
> explicitly by the watchdog. I had set the watchdog timer to 30 seconds.
>
> -Mike
>
>  
>> -----Original Message-----
>> From: Andrew Hart CEMS Staff [mailto:Andrew2.Hart@...]
>> Sent: Tuesday, June 30, 2009 6:03 AM
>> To: exist
>> Subject: [Exist-open] query timeout bug
>>
>> I recently tried to use
>> - query-timeout
>>                 this attribute sets the maximum amount of
>> time (expressed in
>>                 milliseconds) that the query can take before
>> it is killed..
>> from conf.xml to limit queries to 5 minutes or less.  This
>> was because some of our scripts get data from an external
>> source through a proxy, either of which can take forever to
>> respond...Anyway it worked well apart from the fact that it
>> randomly kills xqueries immediately (and gives the query
>> timed out error).
>>
>> Anyone else get this?  I am on Solaris 10 java 1.5.0_01 eXist says
>> 8849-20090416 but this may be wrong as I have to remember to
>> type it in before build.sh
>>
>> I am asking because it could be something local - like our
>> http proxy - causing the problem.
>>
>>
>> This email was independently scanned for viruses by McAfee
>> anti-virus software and none were found
>> --------------------------------------------------------------
>> ----------------
>> _______________________________________________
>> Exist-open mailing list
>> Exist-open@...
>> https://lists.sourceforge.net/lists/listinfo/exist-open
>>
>>    
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Exist-open mailing list
> Exist-open@...
> https://lists.sourceforge.net/lists/listinfo/exist-open
>
>
> This incoming email to UWE has been independently scanned for viruses by McAfee anti-virus software and none were detected
>
>  



This email was independently scanned for viruses by McAfee anti-virus software and none were found
------------------------------------------------------------------------------
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Parent Message unknown Re: query timeout bug

by Frey, Anthony - OJA :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We started receiving this same exception after we recently upgraded from 1.2.5 to 1.3dev in our test environment. I believe the problem stems from the reset method getting invoked on the watch dog of the top-level context instead of the context itself. This becomes a problem when executing queries that import modules. The context will iterate through nested contexts and reset them but the watch dog does not so basically the timer continues to run on module contexts. You can read my original post on the problem here:

http://sourceforge.net/mailarchive/forum.php?thread_name=1B700CF271115444B0DFCBFD2CA234AC56E14F620C%40MEWMAD0PC01G01.accounts.wistate.us&forum_name=exist-open

I patched our eXist locally simply by changing the reset method invocation like this:

org.exist.xquery.XQuery:
217:            // context.getWatchDog().reset();
218:         context.reset()

This fixed the problem for us. However, I don't yet fully understand the dependencies between contexts and modules so I'm not sure if this is correct and won't cause other issues. If any other developers could validate this that would be great.

Thanks,
--Tony


------------------------------

Message: 6
Date: Tue, 30 Jun 2009 08:05:49 -0400
From: "Michael Sokolov" <sokolov@...>
Subject: Re: [Exist-open] query timeout bug
To: "'Andrew Hart CEMS Staff'" <Andrew2.Hart@...>,        "'exist'"
        <exist-open@...>
Message-ID: <200906301147.n5UBlaKJ001264@...>
Content-Type: text/plain;       charset="us-ascii"

I had a similar issue (1.3-dev version on linux).  Queries would randomly
die immediately, with the message that they had taken too long: sorry don't
have the details, but it really did sound like they had been killed
explicitly by the watchdog. I had set the watchdog timer to 30 seconds.

-Mike

> -----Original Message-----
> From: Andrew Hart CEMS Staff [mailto:Andrew2.Hart@...]
> Sent: Tuesday, June 30, 2009 6:03 AM
> To: exist
> Subject: [Exist-open] query timeout bug
>
> I recently tried to use
> - query-timeout
>                 this attribute sets the maximum amount of
> time (expressed in
>                 milliseconds) that the query can take before
> it is killed..
> from conf.xml to limit queries to 5 minutes or less.  This
> was because some of our scripts get data from an external
> source through a proxy, either of which can take forever to
> respond...Anyway it worked well apart from the fact that it
> randomly kills xqueries immediately (and gives the query
> timed out error).
>
> Anyone else get this?  I am on Solaris 10 java 1.5.0_01 eXist says
> 8849-20090416 but this may be wrong as I have to remember to
> type it in before build.sh
>
> I am asking because it could be something local - like our
> http proxy - causing the problem.
>





------------------------------------------------------------------------------
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open