a!queryEntity() timeout

Hello!

We encountered a strange issue, one of our queries runs ok from oracle developer but sometimes ago started to fail in Appian. Appian reported it as rule error but in the log there is a timeout. We have it as 30 seconds and from oracle developer the query runs in 1-2 seconds.

What can cause such difference between using query from database tool and from appian?

  Discussion posts and replies are publicly visible

Parents
  • If you cannot find another solution, I have found success in the past by using the "Execute Stored Procedure" shared component to execute long-running queries, as that Smart Service is immune to the timeout of queryEntities (though I have never used the function that also comes with the shared component). This will also allow you to bypass the two-step query process that Appian uses and just get the desired rows, which going off what I've read in this post will reduce the time of the query to below the timeout threshold anyway.

Reply
  • If you cannot find another solution, I have found success in the past by using the "Execute Stored Procedure" shared component to execute long-running queries, as that Smart Service is immune to the timeout of queryEntities (though I have never used the function that also comes with the shared component). This will also allow you to bypass the two-step query process that Appian uses and just get the desired rows, which going off what I've read in this post will reduce the time of the query to below the timeout threshold anyway.

Children
  • 0
    A Score Level 1
    in reply to gianninol
    I agree with , We have also used same approaches to get the data back from DB if it is taking too much time using query entity. Since query entity is running with in the boundaries (like time outs and other stuff) of Appian where as Execute Stored Procedure does not. If you are using Oracle EE 12 then I think it is now allowing the json format reading and returning the data from DB. Where are you using this query like are you showing data inside the grid or just to export it to excel? Scenarios may vary based on the need.

    If you still want to continue with the query entity then you may heck the following. Please ignore if yo have already tried below things.

    1) You can have more indexes or filters in the query or pagination as @chandu suggested.
    2) You can increase query time out in the properties file but it will affect all other queries.

    I hope this may help.
  • Thanks, using stored procedure to some long data preparation looks promising. I'm curios why appian doesn't have a parameter to skip paging if needed.