So the key to avoid pauses is to have the pool size bigger than the
concurrent threads.

Lvc@



On 9 June 2014 14:18, Andrey Lomakin <[email protected]> wrote:

> Hi,
> Actually it is absolutely normal all connections are pulled off and no
> free one.
>
> If you think it is still an issue you can create bug in bug tracker and we
> will look on it.
>
>
> On Mon, Jun 9, 2014 at 12:32 PM, Andi Egloff <[email protected]>
> wrote:
>
>> Was there any consensus/resolution based on that test?
>> Thanks
>> Andi
>>
>> On Wednesday, April 9, 2014 9:22:29 PM UTC+2, Denis Wilson Souza Rosa
>> wrote:
>>>
>>>
>>> Hi!
>>>
>>> The problem seems to be related to the size of the pool x Number of
>>> threads. I mean, like you cannot have more threads trying to do something
>>> than your pool size.
>>>
>>> PS: Im using orientdb-community-1.7-rc2
>>>
>>> public static void main(String[] args) throws Exception {
>>> final OrientGraphFactory factory = new OrientGraphFactory("remote:
>>> localhost/tenant2").setupPool(1, 5);
>>>  for(int i = 0; i < 100; i++) {
>>>   if(i % 10 == 0) {
>>>                                 //Just to not open 100 threads once
>>> Thread.sleep(3000);
>>>  }
>>> Thread thread = new Thread(
>>> new Runnable() {
>>>  @Override
>>> public void run() {
>>>  OrientGraph graph = factory.getTx();
>>>  synchronized(this) {
>>>  try {
>>>  Vertex vertex = graph.addVertex("class:USER");
>>> vertex.setProperty("counter", "teste");
>>>  graph.commit();
>>>
>>> } finally {
>>> graph.shutdown();
>>>  }
>>> }
>>> }
>>> });
>>>  thread.start();
>>>  }
>>> }
>>>
>>>
>>>
>>> On Wednesday, April 9, 2014 11:55:47 AM UTC-3, Lvc@ wrote:
>>>>
>>>> Hi,
>>>> We've test cases against pool usage, so in order to fix it, we'd ned to
>>>> reproduce your problem.
>>>>
>>>> Lvc@
>>>>
>>>>
>>>>
>>>> On 9 April 2014 16:50, Denis Wilson Souza Rosa <[email protected]>
>>>> wrote:
>>>>
>>>>> Hi all!
>>>>>
>>>>> Sometimes I simple got the following exception:
>>>>>
>>>>> com.orientechnologies.common.concur.lock.OLockException: Not more
>>>>> resources available in pool. Requested resource: remote:localhost/xxxx
>>>>>  at com.orientechnologies.common.concur.resource.OResourcePool.
>>>>> getResource(OResourcePool.java:46)
>>>>> at com.orientechnologies.orient.core.db.ODatabasePoolAbstract.
>>>>> acquire(ODatabasePoolAbstract.java:93)
>>>>>  at com.orientechnologies.orient.core.db.ODatabasePoolAbstract.
>>>>> acquire(ODatabasePoolAbstract.java:78)
>>>>> at com.orientechnologies.orient.core.db.ODatabasePoolBase.
>>>>> acquire(ODatabasePoolBase.java:105)
>>>>>  at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.<
>>>>> init>(OrientBaseGraph.java:121)
>>>>> at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.<
>>>>> init>(OrientTransactionalGraph.java:37)
>>>>>  at com.tinkerpop.blueprints.impls.orient.OrientGraph.<
>>>>> init>(OrientGraph.java:54)
>>>>> at com.tinkerpop.blueprints.impls.orient.OrientGraphFactory.getTx(
>>>>> OrientGraphFactory.java:49)
>>>>>
>>>>>
>>>>> I got a pool size of 20 :
>>>>>
>>>>> OrientGraphFactory factory = new 
>>>>> OrientGraphFactory("remote:localhost/xxxx").setupPool(1,
>>>>> 20);
>>>>>
>>>>> And I am pretty sure that all my calls are made inside a block like
>>>>> this:
>>>>>
>>>>> OrientGraph graph = factory.getTx();
>>>>> try{
>>>>> ...
>>>>> } finally {
>>>>>     graph.shutdown();
>>>>> }
>>>>>
>>>>> I know that increasing the pool size will make this problem not occur
>>>>> so often, but it is a kind of "masking" the real problem. Any ideas of 
>>>>> what
>>>>> is the root cause or how can I really solve this issue?
>>>>>
>>>>>
>>>>> Thanks a lot!
>>>>>
>>>>>  --
>>>>>
>>>>> ---
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "OrientDB" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>  --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Best regards,
> Andrey Lomakin.
>
> Orient Technologies
> the Company behind OrientDB
>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to