You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Neal Dewing <ne...@cibecs.com> on 2005/06/03 09:25:41 UTC

Limit to number of active databases?

Hi,

I have the following odd requirement...

I require opening a single connection to multiple databases concurrently.
The Derby embedded driver seems to fall out while attempting to open 75 - 85
different databases.

Is there any record of this limitation? What are my options?

Any help will be appreciated!

Kind Regards,
Neal


Re: Limit to number of active databases?

Posted by Mike Matrigali <mi...@sbcglobal.net>.
I also don't think there is a limit, but as Shreyas suggests you may
be running into some sort of resource limit in JVM/OS. On unix OS's
sometimes we run into open file limits, so you may be bumping into
that.

Most of the resources allocated by derby are per database, which means
that for 100 databases there are 100 buffer caches, 100 logging systems,
100 statement caches, 100 background threads, ....   So architecture is 
not the best for your
app, but may work if you can figure out what resource you are running
into.  The error in derby.log for the failed connection may give a hint.

I have heard requests for support for concurrent 1000's of dbs, which
is interesting but definitely needs work to get there.

Do you have a maximum db limit in mind for you application?

Shreyas Kaushik wrote:
> I don't think there is any restriction as such. Try running your VM with 
> extra heap size and it should be fine. I was able to create 100 
> databases and connect to each of them.
> The default heap memory allocated by the VM may be insufficient for such 
> a high number of active databases.
> 
> Hope this helps
> 
> ~Shreyas
> 
> Neal Dewing wrote:
> 
>> Hi,
>>
>> I have the following odd requirement...
>>
>> I require opening a single connection to multiple databases concurrently.
>> The Derby embedded driver seems to fall out while attempting to open 
>> 75 - 85
>> different databases.
>>
>> Is there any record of this limitation? What are my options?
>>
>> Any help will be appreciated!
>>
>> Kind Regards,
>> Neal
>>
>>  
>>
> 
> 


Re: Limit to number of active databases?

Posted by Shreyas Kaushik <Sh...@Sun.COM>.
I don't think there is any restriction as such. Try running your VM with 
extra heap size and it should be fine. I was able to create 100 
databases and connect to each of them.
The default heap memory allocated by the VM may be insufficient for such 
a high number of active databases.

Hope this helps

~Shreyas

Neal Dewing wrote:

>Hi,
>
>I have the following odd requirement...
>
>I require opening a single connection to multiple databases concurrently.
>The Derby embedded driver seems to fall out while attempting to open 75 - 85
>different databases.
>
>Is there any record of this limitation? What are my options?
>
>Any help will be appreciated!
>
>Kind Regards,
>Neal
>
>  
>

Re: Limit to number of active databases?

Posted by The Wogster <wo...@yahoo.ca>.
Neal Dewing wrote:
> Hi,
> 
> I have the following odd requirement...
> 
> I require opening a single connection to multiple databases concurrently.
> The Derby embedded driver seems to fall out while attempting to open 75 - 85
> different databases.
> 
> Is there any record of this limitation? What are my options?
> 

The idea of a database, is as a central repository of information, many 
large corporations, including some Fortune 50 companies have less then a 
dozen.  So the question begs, why the need for so many "databases".  I 
could see the need for opening many tables in a single database.  Two 
solutions:

1) Tear down the connection between databases and set up a new one.
2) Redesign the application to use fewer databases.
3) Use a client/server setup, then allow the server to set up separate 
connections for each database.

W