db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suresh Thalamati <suresh.thalam...@gmail.com>
Subject Re: Issue with Derby when using with IBM WebSphere Application Server Community Edition
Date Tue, 31 Oct 2006 23:40:52 GMT
Suraj Batuwana wrote:
> Hi Suresh,
> 

> 3.I do not see any files with zero length in the <database name> 
> seg0 directory of the database.

That's good news. zero-length files are the real scary ones.

> 
> 4) I am able to reproduce this error consistently on a new database also.
> 
> 5) I have attached my derby.log for your reference.
> 
> Looking at that I have found several interesting things.(I am assuming)
> While the nightly build tests are happing with derby/WASCE the derby shuting
> down and booting its instances. It seems that shuting down of instances are
> happening while the live connections are still there.
> 
> But when I running the same code base with derby/websphere 6.0.2.5 only one
> time boot up is happend. here It tries to shutdown and boot up the instance
> several times. Is there a way to stop or controll the  shuting down and boot
> up the derby instance.

Thanks for providing more info on this problem. By looking at the 
derby.log , the reason you are seeing many boot/shutdown sequences is 
when  derby fails to open the container file, it is serious error , so 
it shutdown the database automatically to avoid any chance for 
corruptions.  When a next attempt was made to connect to the database 
,it is attempting to boot again.


I looked at the stacks in the derby.log.  Real problem seems to be for 
some reason , derby engine is not unable to open the container files. 
It is happening while compiling a query and also during boot on 
recovery. That makes me inclined to believe it is an environment issue.

D:\wasce_build\TestBuild\build1\target\sampledb\seg0\c5d1.dat (Cannot 
create a file when that file already exists) at 
java.io.RandomAccessFile.open(Native Method) at 
java.io.RandomAccessFile.<INIT>(RandomAccessFile.java(Compiled Code))

 From the derby.log : unable to open these two files seg0\c5d1.dat and 
seg0\c2d0.dat.

Please check the permissions/owner ship of the file in the seg0. 
Typically the reason will be "Access denied ....". So I doubt
that is the case.

I wrote a small program to find what causes  "Cannot create a file 
when that file already exists" error case,  only time I am able to hit 
that is when system ran out of file handles(file descriptors).

After bit of googling found a reporred bug on jdk142 
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4189011,  may be 
you are hitting this one.

When I tried my small program on jdk15, it managed to open 10000 
files, whereas on jdk142 (both on ibm and sun)  it was failing
around 2020 .

Derby does need so many file handles, it might be that something else 
is leaking the file descriptors  and derby is failing as side-effect. 
  It might be worth finding, all the open file handles on the system 
when this error occurs. I don't know how to do that on Windows.

One another thing,  I would try is  after you hit the error. Shutdown 
WAS and the network server and then  connect to the database using IJ 
and see if you can perform some queries on the database. If this works 
then is most likely a file descriptors problem.

Thanks
-suresh

Mime
View raw message