</listitem>
</varlistentry>
- <varlistentry>
+ <varlistentry id="service-timeout">
<term>timeout</term>
<listitem>
<para>
z3950_operation (30) < session (60) < z3950_session (180) .
The default values are given in parantheses.
</para>
+ <para>
+ The Z39.50 operation timeout may be set per database. Refer to
+ <xref linkend="pztimeout"/>.
+ </para>
</listitem>
</varlistentry>
</variablelist> <!-- Data elements in service directive -->
</listitem>
</varlistentry>
+
+ <varlistentry id="pztimeout">
+ <term>pz:timeout</term>
+ <listitem>
+ <para>
+ Specifies timeout for operation (eg search, and fetch) for
+ a database. This overrides the z3650_operation timeout
+ that is given for a service. See <xref linkend="service-timeout"/>.
+ </para>
+ <note>
+ <para>
+ The timeout facility is supported for Pazpar2 version 1.8.4 and later.
+ </para>
+ </note>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="pzurl">
<term>pz:url</term>
<listitem>
-<settings target="localhost:9999/Default">
+<settings target="localhost:9999/Slow">
<!-- Simple test against a local test server (could be yaz-ztest) -->
<set name="pz:name" value="Local Test"/>
<set name="pz:apdulog" value="0"/>
+ <set name="pz:timeout" value="10"/>
<!-- mapping for unqualified search -->
<set name="pz:cclmap:term" value="u=1016 t=l,r s=al"/>
const char *opt_preferred = session_setting_oneval(sdb, PZ_PREFERRED);
const char *extra_args = session_setting_oneval(sdb, PZ_EXTRA_ARGS);
const char *opt_present_chunk = session_setting_oneval(sdb, PZ_PRESENT_CHUNK);
+ const char *opt_timeout = session_setting_oneval(sdb, PZ_TIMEOUT);
ZOOM_query query;
char maxrecs_str[24], startrecs_str[24], present_chunk_str[24];
struct timeval tval;
int present_chunk = 20; // Default chunk size
int rc_prep_connection;
+ int operation_timeout = se->service->z3950_operation_timeout;
cl->diagnostic = 0;
cl->record_failures = cl->ingest_failures = cl->filtered = 0;
yaz_gettimeofday(&tval);
tval.tv_sec += 5;
+ if (opt_timeout && *opt_timeout)
+ operation_timeout = atoi(opt_timeout);
+
if (opt_present_chunk && strcmp(opt_present_chunk,"")) {
present_chunk = atoi(opt_present_chunk);
yaz_log(YLOG_DEBUG, "Present chunk set to %d", present_chunk);
}
rc_prep_connection =
- client_prep_connection(cl, se->service->z3950_operation_timeout,
+ client_prep_connection(cl, operation_timeout,
se->service->z3950_session_timeout,
se->service->server->iochan_man,
&tval);