Exception when dataset bigger than treshold

#1

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.

 

#2

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
#3

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.

#4

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

ObjectDB Support
#5

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

#6

Sorry. Please check it now.

ObjectDB Support
#7

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 :)

Reply