500 words

Exception when dataset bigger than treshold

#1
2011-06-20 10:29

I was working on reporting service for my application and found a problem with datasets bigger than treshold set in objectdb.conf.

 

<objectdb>
        <general>
                <temp path="$temp/ObjectDB" threshold="64mb" />
                <network inactivity-timeout="0" />
                <log path="$objectdb/log/" max="8mb" stdout="false" stderr="false" />
                <log-archive path="$objectdb/log/archive/" retain="90" />
                <logger name="query.manager" level="debug" /
        </general>

with these settings, running a query that operates on quite a big number of objects (~300k) throws an exception:

com.objectdb.o.UserException: Failed to create a new file '/tmp/ObjectDB/789641482/BatchQueryItr_0.fls'
at com.objectdb.o.MSG.d(MSG.java:74) ~[objectdb.jar:na]
at com.objectdb.o.LFL.K(LFL.java:826) ~[objectdb.jar:na]
at com.objectdb.o.LFL.H(LFL.java:766) ~[objectdb.jar:na]
at com.objectdb.o.TFM$h.H(TFM.java:190) ~[objectdb.jar:na]
at com.objectdb.o.LFL.H(LFL.java:735) ~[objectdb.jar:na]
at com.objectdb.o.VLV.o(VLV.java:224) ~[objectdb.jar:na]
at com.objectdb.o.VLV.m(VLV.java:166) ~[objectdb.jar:na]
at com.objectdb.o.TAI.N(TAI.java:271) ~[objectdb.jar:na]
at com.objectdb.o.TAI.j(TAI.java:234) ~[objectdb.jar:na]
at com.objectdb.o.RTT.F(RTT.java:263) ~[objectdb.jar:na]
at com.objectdb.o.RTT.E(RTT.java:245) ~[objectdb.jar:na]
at com.objectdb.o.RST.B(RST.java:169) ~[objectdb.jar:na]
at com.objectdb.o.RTT.l(RTT.java:134) ~[objectdb.jar:na]
at com.objectdb.o.RST.l(RST.java:24) ~[objectdb.jar:na]
at com.objectdb.o.RTT.C(RTT.java:179) ~[objectdb.jar:na]
at com.objectdb.o.RST.r(RST.java:110) ~[objectdb.jar:na]
at com.objectdb.o.PGT.q(PGT.java:109) ~[objectdb.jar:na]
at com.objectdb.o.RST.A(RST.java:93) ~[objectdb.jar:na]
at com.objectdb.o.RTT.l(RTT.java:132) ~[objectdb.jar:na]
at com.objectdb.o.RST.l(RST.java:24) ~[objectdb.jar:na]
at com.objectdb.o.RTT.C(RTT.java:179) ~[objectdb.jar:na]
at com.objectdb.o.RST.r(RST.java:110) ~[objectdb.jar:na]
at com.objectdb.o.PGT.q(PGT.java:109) ~[objectdb.jar:na]
at com.objectdb.o.RST.A(RST.java:93) ~[objectdb.jar:na]
at com.objectdb.o.RTT.l(RTT.java:132) ~[objectdb.jar:na]
at com.objectdb.o.RST.l(RST.java:24) ~[objectdb.jar:na]
at com.objectdb.o.TSK.i(TSK.java:146) ~[objectdb.jar:na]
at com.objectdb.o.TSK.f(TSK.java:95) ~[objectdb.jar:na]
at com.objectdb.o.TSM.e(TSM.java:87) ~[objectdb.jar:na]
at com.objectdb.o.MST.UP(MST.java:545) ~[objectdb.jar:na]
at com.objectdb.o.PLN.UP(PLN.java:481) ~[objectdb.jar:na]
at com.objectdb.o.TAI.M(TAI.java:200) ~[objectdb.jar:na]
at com.objectdb.o.TAI.Us(TAI.java:134) ~[objectdb.jar:na]
at com.objectdb.o.MQI.Us(MQI.java:96) ~[objectdb.jar:na]
at com.objectdb.o.PRG.aa(PRG.java:596) ~[objectdb.jar:na]
at com.objectdb.o.QRM.UR(QRM.java:256) ~[objectdb.jar:na]
at com.objectdb.o.MST.UR(MST.java:878) ~[objectdb.jar:na]
at com.objectdb.o.WRA.UR(WRA.java:286) ~[objectdb.jar:na]
at com.objectdb.o.WSM.UR(WSM.java:113) ~[objectdb.jar:na]
at com.objectdb.o.STC.r(STC.java:421) ~[objectdb.jar:na]
at com.objectdb.o.SHN.ah(SHN.java:468) ~[objectdb.jar:na]
at com.objectdb.o.SHN.J(SHN.java:146) ~[objectdb.jar:na]
at com.objectdb.o.HND.run(HND.java:133) ~[objectdb.jar:na]
at java.lang.Thread.run(Thread.java:636) [na:1.6.0_24]
Caused by: java.io.FileNotFoundException: /tmp/ObjectDB/789641482/BatchQueryItr_0.fls (No such file or directory)
at java.io.RandomAccessFile.open(Native Method) ~[na:1.6.0_24]
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:233) ~[na:1.6.0_24]
at com.objectdb.o.LFL.K(LFL.java:813) ~[objectdb.jar:na]
... 42 common frames omitted

Changing treshold to 96M "fixes" the problem - with 96MB can run this query in memory, so no temp files.

Doctor works fine with low treshold values and can create files in tmp for each run if needed.

 

lwalkowski
lwalkowski's picture
Joined on 2010-08-25
User Post #32
#2
2011-06-20 11:01

ObjectDB has failed in creating a temporary file at /tmp/ObjectDB/789641482/BatchQueryItr_0.fls.

Please check permissions.

In addition, if the directory /tmp/ObjectDB doesn't exist you may try creating it.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #370
#3
2011-06-20 11:08

Yes, I know that :) Permissions are OK.

drwxr-xr-x 3 odb  odb  4096 Jun 20 12:25 .
drwsrwxrwt 6 root root 4096 Jun 20 12:35 ..
drwxr-xr-x 2 odb  odb  4096 Jun 20 12:25 1021235963
-rw-r--r-- 1 odb  odb     0 Jun 20 12:25 1021235963.lck

ODB server is running as odb user and odb group. Doctor on the same database, which is quite big:

-rw-r--r-- 1 odb odb 411M Jun 20 12:26 HomplexTool.odb
-rw-r--r-- 1 odb odb  34K Jun 20 12:26 HomplexTool.odb$

works fine using the same username. During rebuilding process I can find fls files in /tmp/ObjectDB even when treshold is set as low as 16MB. The only problem is with ODB when there is a need for temporary files.

lwalkowski
lwalkowski's picture
Joined on 2010-08-25
User Post #33
#4
2011-06-20 12:00

Could you please check build 2.2.7_04 that may fix the problem?

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #371
#5
2011-06-20 13:44

Sure, but I can't find this build in Download section. Last one is _03

lwalkowski
lwalkowski's picture
Joined on 2010-08-25
User Post #34
#6
2011-06-20 14:07

Sorry. Please check it now.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #373
#7
2011-06-20 15:40

Yes, this build fixes problem. Even with very small treshold sizes everything works find and temporary files are created correctly.

 

Thanks for quick fix - as always :)

lwalkowski
lwalkowski's picture
Joined on 2010-08-25
User Post #35

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel