... | ... | @@ -196,6 +196,37 @@ declare_project(name='mytests', |
|
|
recurse='myconfig mylsvsim icd tests')
|
|
|
```
|
|
|
|
|
|
--------------------------------------------------------------------------
|
|
|
--------------------------------------------------------------------------
|
|
|
--------------------------------------------------------------------------
|
|
|
### Connecting to OLDB takes long, then fails \[cpp Oldb\]
|
|
|
|
|
|
**Question**
|
|
|
My application blocks a long time on first OLDB access, and eventually fails with a timeout.
|
|
|
|
|
|
**Answer**
|
|
|
|
|
|
Reconfigure the communication timeout (default: 60 seconds)
|
|
|
|
|
|
a) through an environment variable and a properties file
|
|
|
|
|
|
```
|
|
|
$ cat <<EOF >/tmp/cii_client.ini
|
|
|
connection_timeout = 5
|
|
|
EOF
|
|
|
$ export CONFIG_CLIENT_INI = /tmp/cii_client.ini
|
|
|
```
|
|
|
|
|
|
b) programmatically (available since CII 2.0/DevEnv 3.9)
|
|
|
|
|
|
```
|
|
|
CiiClientConfiguration config_client_ini = { .connection_timeout = 5, };
|
|
|
elt::config::CiiConfigClient::SetDevClientConfig (config_client_ini);
|
|
|
```
|
|
|
|
|
|
**Background**
|
|
|
|
|
|
The actual stalling comes from a failed MAL-communication with the CII Internal Configuration System, which likely is not running. Setting the timeout for the CiiConfigClient is therefore the thing to do. Note that the properties file (aka. "deployment config") takes precedence and will, if they overlap, overrule the programmatic (aka. "developer config") settings.
|
|
|
|
|
|
--------------------------------------------------------------------------
|
|
|
--------------------------------------------------------------------------
|
... | ... | |