Hi Alexander,
Could you attach full exception log?

Lvc@

ᐧ

On 11 February 2015 at 15:17, alexander anguiano <jobl...@gmail.com> wrote:

> orientdb 2.0.1
> java 7
> window & linux
> sql and the java api
>
> I have a multi-thread environment with multiple threads updating and
> reading. date from my graph database.
>
>
> I run this query several times a minutes form different threads
>
> QueryA - runs several times a minute
> update (select expand(in('Manages')) from asset where guid = '%s') set
> lastCommunicationTime=date()
>
> QueryB - runs on demand - This is the query that quits working
> select @rid as id, $computer.@rid as computerId, $computer.hostname as
> hostname, $computer.addresses as addresses, $computer.tags as computerTags,
> $computer.version as computerVersion,
>     version as agentVersion, lastCommunicationTime, registrationTime from
> (select expand(in("MemberOf")) from #%s)  where  $computer.size() > 0 and
> lastCommunicationTime > %s Let $computer = out("Manages")
>
>  I eventually I get this error
>
> com.orientechnologies.common.concur.OTimeoutException: Can not lock record
> for 2000 ms. seems record is deadlocked by other record
>
> The stack trace looks like it some facility in orientdb and does not
> reference any of my code in the stack trace.
>
>
> 1 How do i avoid this exception?
> 2 How do i recover from this exception, once it happens QueryB won't work
> until i restart the orient db server
>
> Also i tried this
> OGlobalConfiguration.STORAGE_RECORD_LOCK_TIMEOUT.setValue(1000*30);
> and it didn't help any
>
> Im basically making my calls like this
>
> OrientGraphFactory factory = new OrientGraphFactory(url, username,
> password);
>
> factory.setupPool(10, 100);
> OrientGraph conn = factory.getTx();
> try {
>
> // update
> String sql =......
>
> conn.command(new OCommandSQL(sql)).execute();
> } catch (Exception e) {
> e.printStackTrace();
> } finally {
> conn.shutdown();
> }
>
>
> //
>
>  --
>
> ---
> 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 orient-database+unsubscr...@googlegroups.com.
> 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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to