<docbook><section><title>VirtTipsAndTricksAdminSpongerInstance</title><para> </para>
<title> Virtuoso Guide for Administering Your Sponger Instance</title> Virtuoso Guide for Administering Your Sponger Instance
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> What?</bridgehead>
 Configure Rate Limit in Virtuoso for administering Virtuoso Sponger Instance.<bridgehead class="http://www.w3.org/1999/xhtml:h2"> Why?</bridgehead>
 Use Rate Limit for search engine optimization statistics.<bridgehead class="http://www.w3.org/1999/xhtml:h2">How?</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h3">ACLs</bridgehead>
<para>Rate Limit is configurable from <emphasis>Virtuoso Conductor -&gt; System Admin -&gt; Security -&gt; Access Control</emphasis> where: </para>
<itemizedlist mark="bullet" spacing="compact"><listitem>Regular expressions are not supported.
</listitem>
<listitem>Patterns may be used; for example — <programlisting>-- like &#39;%XXX&#39; or
-- XXX*
</programlisting></listitem>
<listitem>Rate limit is hits/per second from one IP address.</listitem>
</itemizedlist><para>For search engine optimization statistics for example can be set rate limit 10 (or even 100 so to start to collect statistics), and then to check with http_acl_stats() what values are returned.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3">Service Rate Limits -- Sponger Level (controlling use of the service subject to resource settings in INI)</bridgehead>
<para>The Virtuoso Rate Limiter uses the http_limited() function inside the Sponger description.vsp page to check if the number of running threads is more than the MaxRestrictedThreads parameter&#39;s value in the [ServerThreads] INI section.
 A <emphasis>42000</emphasis> error is signaled if over this limit.
 By default, there is no limit.
 If there are too many requests, then a <emphasis>Limit exceeded</emphasis> error will be signaled.</para>
<para>This feature is enabled when [HTTPServer] MaxRestrictedThreads parameter value is less than [Parameters] ServerThreads parameter value in the Virtuoso INI.</para>
<para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3">Client Connection Rate Limits</bridgehead>
<para>Virtuoso instance Level (e.g., controlling at the IP level; that is, controlling connections from client addresses).</para>
<para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3">Query Limits</bridgehead>
<para>Query Limits can be set in the [SPARQL] Virtuoso INI section:</para>
<programlisting>;virtuoso.ini
...
[SPARQL]
;ExternalQuerySource = 1
;ExternalXsltSource  = 1
ResultSetMaxRows = 100000
;DefaultGraph       = http://localhost:8890/dataspace
;MaxQueryCostEstimationTime    = 120 ; in seconds
;MaxQueryExecutionTime    = 10 ; in seconds
</programlisting><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="http://docs.openlinksw.com/virtuoso/wsacl.html#wsaclgenpurpacl">Virtuoso ACLs</ulink> </listitem>
<listitem><ulink url="VirtTipsAndTricksGuide">Virtuoso Tips and Tricks Collection</ulink> </listitem>
</itemizedlist></section></docbook>