Answered

Database call timeout

I have a  data base call (Get DB Value) which times out before the database returns values.   I can execute this call manually and to see values return, so I would like to extend the timeout so that the call waits for the values to return.  It does take a while.

How do I do this?

0
6 comments
Avatar
Zach Schwantes

Hey William! I could be wrong, but I would follow these steps.

1. Go to Administration -> Account Preferences

2. Select Timeouts Tab ->

3. Update Change Step Timeout Limit (s) from current amount to something higher, maybe 120? 

There is not a really a wrong amount value to input here, it's whatever you are comfortable with. This is what we used to prevent our APIs from timing out on a step level, and we changed this to 180(s).

0
Comment actions Permalink
Avatar
Firas Khalili

Hi William,

Would you please let us know the following

  1. Are you seeing the same behavior both in the cloud and locally?
  2. How large is the response you're receiving?
  3. Is the timeout occurring with this specific query only, or with others as well?
  4. Would you please send us a screenshot of the step after the timeout occurs, along with the local player logs?
  5. Additionally, please send a screenshot of the Account Preferences > Timeout tab

 

Regards,
Subject7 Team

0
Comment actions Permalink
Avatar
William Smith

It was determined that when this database call is executed manually it takes about 25 minutes.   So since there is a 400 second limit on the step timeout I cannot increase that.   We are looking into some re-indexing of the database to see if that helps, but the question is still significant.  Thanks for the timeout update suggestion Zach.

Here are the items requested:

LOGS:
[DEBUG] Connecting to database...
[DEBUG] Creating statement after variable resolutions query:SELECT appl_id,select_pay_category FROM grants_data_sc.vw_grant_oneviewapp where select_pay_category is not null  limit 1;
[WARN] null
[INFO] Step index=18 ERROR 299999(ms) [Get Results from Database] message='Timeout after 300000 ms'
[INFO] Step index=17 FAIL 299999(ms) [Else] message='Execution failed at step 19. Message Timeout after 300000 ms'
[INFO] Step index=13 FAIL 299999(ms) [If there is no record] message='Execution failed at step 19. Message Timeout after 300000 ms'
[INFO] Step index=7 FAIL 738226(ms) [Start Iteration to get data from database and webservice and compare the values] message='Execution failed at step 19. Message Timeout after 300000 ms'
[INFO] Step index=0 FAIL 738332(ms) [Loop through commands, starting from 1 to 2 and incrementing by 1, and store the loop number in index] message='Execution failed at step 19. Message Timeout after 300000 ms'

Error Message:



Timeouts:



0
Comment actions Permalink
Avatar
Firas Khalili

Hi William,

Thank you for providing the information. 

Could you please provide more details on the following:

  1. What are you trying to achieve? A brief description of your use case would be helpful.
  2. Which database system are you using (e.g., PostgreSQL, MySQL, etc.)?
  3. Does the query consistently take around 25 minutes, or does the duration vary?
  4. Are there any indexes on the relevant tables or columns used in the query?
  5. Approximately how large is the dataset being queried (e.g., number of rows and columns)
  6. Could you share the exact query you're executing?
  7. Can you send us a sample of the response you receive when manually executing the call?


Regards,
Subject7 Team

0
Comment actions Permalink
Avatar
William Smith

With regard to your query.   You may not be able to reproduce it.   This is not specifically a broken Subject7 issue.   This is a database call which takes a long time to return data.  The query is already posted.  The question is, "is there a way to increase the timeout?"   The answer appears to be no.  If that is the case, I will find a work around.

  1. What are you trying to achieve? A brief description of your use case would be helpful.
    Query the database so that I can make comparisons of those results to what the application sees.
  2. Which database system are you using (e.g., PostgreSQL, MySQL, etc.)?
    postgres
  3. Does the query consistently take around 25 minutes, or does the duration vary?
    It varies depending on circumstances.   The 25 minute variation is legitimate.
  4. Are there any indexes on the relevant tables or columns used in the query?
    yes
  5. Approximately how large is the dataset being queried (e.g., number of rows and columns)
    Very large
  6. Could you share the exact query you're executing?
    It is shown in the log messages.
  7. Can you send us a sample of the response you receive when manually executing the call?
    I cannot provide that data, but I get a database table output as expected.




0
Comment actions Permalink
Avatar
Firas Khalili

Hi William,

Thanks for providing that info. The only thing we can suggest is update the query to narrow down the returned results. The Step Timeout is 400s max, so this would give you approximately 6.6 minutes for each query.

While we may increase this limit in the future releases, this may cause system instability, which is why this limit was set in place.

Please let us know if you have any concerns/questions on this.

 

Regards,
Subject7 Team

0
Comment actions Permalink

Please sign in to leave a comment.