2 <opensrf version="0.0.1">
5 There is one <host> entry for each server on the network. Settings for the
6 'default' host are used for every setting that isn't overridden within a given
9 To specify which applications a host is serving, list those applications
10 within that host's config section. If the defaults are acceptible, then
11 that's all that needs to be added/changed.
13 Any valid XML may be added to the <default> block and server components will have
21 <!-- opensrf log files go in this directory -->
22 <log>/path/to/log</log>
24 <!-- opensrf unix domaind socket files go here -->
25 <sock>/path/to/sock</sock>
27 <!-- opensrf pids go here -->
28 <pid>/path/to/pid</pid>
30 <!-- global config directory -->
31 <conf>/path/to/conf</conf>
34 <!-- prefork, simple. prefork is suggested -->
35 <server_type>prefork</server_type>
37 <!-- Default doesn't host any apps -->
43 <!-- memcached server ip:port -->
44 <server>127.0.0.1:10101</server>
48 <!-- maximun time that anything may stay in the cache -->
49 <max_cache_time>86400</max_cache_time>
54 <!-- These are the defaults for every served app. Each server should
55 duplicate the node layout for any nodes that need changing.
56 Any settings that are overridden in the server specific section
57 will be used as the config values for that server. Any settings that are
58 not overridden will fall back on the defaults
59 Note that overriding 'stateless' will break things -->
64 <!-- How many seconds to wait between server
65 requests before timing out a stateful server session. -->
66 <keepalive>1</keepalive>
68 <!-- if 1, then we support stateless sessions (no connect required),
69 if 0 then we don't -->
70 <stateless>1</stateless>
72 <!-- Tells the servers which language this implementation is coded in
73 In this case non "perl" servers will not be able to load the module -->
74 <language>perl</language>
76 <!-- Module the implements this application -->
77 <implementation>OpenSRF::Application::Persist</implementation>
79 <!-- max stateful requests before a session automatically disconnects a client -->
80 <max_requests>97</max_requests>
82 <!-- settings for the backend application drones. These are probably sane defaults -->
85 <!-- unix socket file -->
86 <unix_sock>opensrf.persist_unix.sock</unix_sock>
89 <unix_pid>opensrf.persist_unix.pid</unix_pid>
91 <!-- max requests per process backend before a child is recycled -->
92 <max_requests>1000</max_requests>
94 <!-- log file for this application -->
95 <unix_log>opensrf.persist_unix.log</unix_log>
97 <!-- Number of children to pre-fork -->
98 <min_children>5</min_children>
100 <!-- maximun number of children to fork -->
101 <max_children>25</max_children>
103 <!-- minimun number of spare forked children -->
104 <min_spare_children>2</min_spare_children>
106 <!-- max number of spare forked children -->
107 <max_spare_children>5</max_spare_children>
111 <!-- Any additional setting for a particular application go in the app_settings node -->
114 <!-- sqlite database file -->
115 <dbfile>/path/to/dbfile/persist.db</dbfile>
121 <keepalive>3</keepalive>
122 <stateless>1</stateless>
123 <language>perl</language>
124 <implementation>OpenSRF::Application::Demo::Math</implementation>
125 <max_requests>97</max_requests>
127 <unix_sock>opensrf.math_unix.sock</unix_sock>
128 <unix_pid>opensrf.math_unix.pid</unix_pid>
129 <max_requests>1000</max_requests>
130 <unix_log>opensrf.math_unix.log</unix_log>
131 <min_children>5</min_children>
132 <max_children>15</max_children>
133 <min_spare_children>2</min_spare_children>
134 <max_spare_children>5</max_spare_children>
139 <keepalive>3</keepalive>
140 <stateless>1</stateless>
141 <language>perl</language>
142 <implementation>OpenSRF::Application::Demo::MathDB</implementation>
143 <max_requests>99</max_requests>
145 <max_requests>1000</max_requests>
146 <unix_log>opensrf.dbmath_unix.log</unix_log>
147 <unix_sock>opensrf.dbmath_unix.sock</unix_sock>
148 <unix_pid>opensrf.dbmath_unix.pid</unix_pid>
149 <min_children>5</min_children>
150 <max_children>15</max_children>
151 <min_spare_children>2</min_spare_children>
152 <max_spare_children>5</max_spare_children>
157 <keepalive>1</keepalive>
158 <stateless>0</stateless>
159 <language>perl</language>
160 <implementation>OpenSRF::Application::Settings</implementation>
161 <max_requests>17</max_requests>
163 <unix_sock>opensrf.settings_unix.sock</unix_sock>
164 <unix_pid>opoensrf.settings_unix.pid</unix_pid>
165 <max_requests>1000</max_requests>
166 <unix_log>opensrf.settings_unix.log</unix_log>
167 <min_children>5</min_children>
168 <max_children>15</max_children>
169 <min_spare_children>3</min_spare_children>
170 <max_spare_children>5</max_spare_children>
180 Must match the fully qualified domain name of the host
181 on Linux, this is usually the output of "hostname -f"
184 <!-- List all of the apps this server will be running -->
186 <appname>opensrf.persist</appname>
187 <appname>opensrf.settings</appname>
188 <appname>opensrf.math</appname>
189 <appname>opensrf.dbmath</appname>
194 <!-- Example of an app-specific setting override -->
197 <dbfile>/different/path/to/dbfile/persist.db</dbfile>