Reputation: 321
I'm getting a timeout exception in my local dev environment for a Persistence SQL query. Is the timeout configurable in Skyve?
Upvotes: 0
Views: 36
Reputation: 321
There are 2 global timeouts in specified in the json config eg
// Datastore definitions
"dataStores": {
// Skyve data store
"skyve": {
// JNDI name
"jndi": "java:/H2Demo",
// Dialect
"dialect": "org.skyve.impl.persistence.hibernate.dialect.H2SpatialDialect",
// Timeout for data store connections employed in general UI/forms processing - 0 indicates no timeout
"oltpConnectionTimeoutInSeconds": 30,
// Timeout for data store connections employed when running jobs and background tasks - 0 indicates no timeout
"asyncConnectionTimeoutInSeconds": 300
}
},
There are timeouts you can specify against each metadata query.
eg
<query name="qUsers" documentName="User" timeoutInSeconds="23">
All programmatic queries can set the timeout.
eg
Persistence p = CORE.getPersistence();
SQL sql = p.newSQL("select 1 ADM_Contact");
sql.setTimeoutInSeconds(200);
sql.scalarIterable(Number.class);
p.newSQL("select 1 ADM_Contact").noTimeout().scalarResults(Number.class);
Upvotes: 1