I did try the inspect command on all databases, which should there are no inconsistencies.I was logging any exceptions, in my java code, in case of errors, and that showed me, which database in particular was in problem, dropping it helped.

This was the first time I saw it. I was worried, DB has grown till the point of not being supported, when I actually panicked.

Thanks,
- Mansi

On Tue, Apr 26, 2016 at 3:27 AM, Christian Grün <christian.gruen@gmail.com> wrote:

Dear Mansi,

you could try to run the INSPECT command on the affected database, or all databases, in order to find out if your database has gone corrupt. Did you repeatedly come across this error?

Best,
Christian

Am 25.04.2016 16:45 schrieb "Mansi Sheth" <mansi.sheth@gmail.com>:
>
> Hello, 
>
> My current BaseXDB is at 920GB, with ~230 databases... I run jetty server visa basexhttp script with giving it explicit 30GB of RAM. While trying to access a query, thru REST api via XQUERY, I get below error. 
>
> HTTP/1.1 400 Bad Request^M
> Content-Type: text/plain;charset=UTF-8^M
> Content-Length: 4207^M
> Server: Jetty(8.1.16.v20140903)^M
> ^M
> Improper use? Potential bug? Your feedback is welcome:
> Contact: basex-talk@mailman.uni-konstanz.de
> Version: BaseX 8.2.3
> Java: Oracle Corporation, 1.7.0_95
> OS: Linux, amd64
> Stack Trace:
> java.lang.RuntimeException: Data Access out of bounds:
> - pre value: 126882320
> - #used blocks: 495643
> - #total locks: 495643
> - access: 495642 (495643 > 495642]
>         at org.basex.util.Util.notExpected(Util.java:60)
>         at org.basex.io.random.TableDiskAccess.cursor(TableDiskAccess.java:458)
>         at org.basex.io.random.TableDiskAccess.read1(TableDiskAccess.java:148)
>         at org.basex.data.Data.kind(Data.java:306)
>         at org.basex.query.value.node.DBNode.<init>(DBNode.java:51)
>         at org.basex.query.value.seq.DBNodeSeq.itemAt(DBNodeSeq.java:68)
>         at org.basex.query.value.seq.DBNodeSeq.itemAt(DBNodeSeq.java:22)
>         at org.basex.query.value.seq.Seq$1.next(Seq.java:77)
>         at org.basex.query.expr.path.IterPath$1.next(IterPath.java:58)
>         at org.basex.query.expr.path.IterPath$1.next(IterPath.java:36)
>         at org.basex.query.MainModule$1.next(MainModule.java:114)
>         at org.basex.query.func.StandardFunc.cache(StandardFunc.java:384)
>         at org.basex.query.func.xquery.XQueryEval.eval(XQueryEval.java:129)
>         at org.basex.query.func.xquery.XQueryEval.eval(XQueryEval.java:59)
>         at org.basex.query.func.xquery.XQueryEval.value(XQueryEval.java:49)
>         at org.basex.query.expr.gflwor.GFLWOR.value(GFLWOR.java:77)
>         at org.basex.query.QueryContext.value(QueryContext.java:421)
>         at org.basex.query.expr.gflwor.Let$LetEval.next(Let.java:187)
>         at org.basex.query.expr.gflwor.GFLWOR$1.next(GFLWOR.java:95)
>         at org.basex.query.MainModule$1.next(MainModule.java:114)
>         at org.basex.core.cmd.AQuery.query(AQuery.java:91)
>         at org.basex.core.cmd.XQuery.run(XQuery.java:22)
>         at org.basex.core.Command.run(Command.java:398)
>         at org.basex.http.rest.RESTCmd.run(RESTCmd.java:99)
>         at org.basex.http.rest.RESTQuery.query(RESTQuery.java:74)
>         at org.basex.http.rest.RESTRun.run0(RESTRun.java:41)
>         at org.basex.http.rest.RESTCmd.run(RESTCmd.java:65)
>         at org.basex.core.Command.run(Command.java:398)
>         at org.basex.core.Command.execute(Command.java:100)
>         at org.basex.core.Command.execute(Command.java:123)
>         at org.basex.http.rest.RESTServlet.run(RESTServlet.java:22)
>         at org.basex.http.BaseXServlet.service(BaseXServlet.java:64)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>         at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
>         at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
>         at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
>         at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
>         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
>         at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
>         at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
>         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>         at org.eclipse.jetty.server.Server.handle(Server.java:370)
>         at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
>         at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
>         at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
>         at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
>         at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
>         at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
>         at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
>         at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
>         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>         at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>         at java.lang.Thread.run(Thread.java:745)
>
>
> --
> - Mansi




--
- Mansi