mirror of
https://github.com/yacy/yacy_search_server.git
synced 2026-10-25 05:54:15 +00:00
Fix Jetty 12 active request accounting
Track each HTTP request independently and always release its entry on completion, failure, or async termination. Enforce the request limit atomically, remove obsolete connection-close accounting, repair stale cleanup, and persist the configured maximum correctly. Update UI terminology, help, localization, and focused regression tests. - Fixes #800 - Fixes #808
This commit is contained in:
1 parent
f9c4b97003
commit
b1fd3b3185
34 files changed
+947
-291
No files matched your search
@@ -268,6 +268,7 @@
|
||||
<include name="net/yacy/http/servlets/ServletResourceTest.java" />
|
||||
<include name="net/yacy/http/servlets/Jetty12QoSFilterTest.java" />
|
||||
<include name="net/yacy/http/servlets/SolrSelectServletTest.java" />
|
||||
<include name="net/yacy/htroot/PerformanceQueues_pTest.java" />
|
||||
<classpath>
|
||||
<pathelement location="${build}" />
|
||||
<path refid="compile.path" />
|
||||
@@ -282,6 +283,7 @@
|
||||
<arg value="net.yacy.http.servlets.ServletResourceTest" />
|
||||
<arg value="net.yacy.http.servlets.Jetty12QoSFilterTest" />
|
||||
<arg value="net.yacy.http.servlets.SolrSelectServletTest" />
|
||||
<arg value="net.yacy.htroot.PerformanceQueues_pTest" />
|
||||
<classpath>
|
||||
<pathelement location="${jetty12.test.classes}" />
|
||||
<pathelement location="${build}" />
|
||||
|
||||
+4
-4
@@ -225,10 +225,10 @@ bootstrapLoadTimeout = 20000
|
||||
# milliseconds
|
||||
clientTimeout = 10000
|
||||
|
||||
# maximal number of httpd sessions
|
||||
# a client may open several connections at once, and the httpdMaxBusySessions value sets
|
||||
# a limit on the number of concurrent connections
|
||||
httpdMaxBusySessions = 200
|
||||
# maximum number of concurrently active incoming HTTP requests
|
||||
# remote requests above this limit receive HTTP 503; local requests are exempt
|
||||
# the historical httpdMaxBusySessions key name is retained for configuration compatibility
|
||||
httpdMaxBusySessions = 200
|
||||
|
||||
# maximum number of simultaneously open outgoing HTTP connections in the general pool (net.yacy.cora.protocol.http.HTTPClient)
|
||||
http.outgoing.pool.general.maxTotal = 200
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
---
|
||||
page: htroot/Connections_p.html
|
||||
help: help/Connections_p.md
|
||||
title: Server Connection Tracking
|
||||
title: Connection and Request Tracking
|
||||
package: monitoring-performance
|
||||
access: admin
|
||||
kind: admin-page
|
||||
backend_java: source/net/yacy/htroot/Connections_p.java
|
||||
---
|
||||
|
||||
# Server Connection Tracking
|
||||
# Connection and Request Tracking
|
||||
|
||||
## Purpose
|
||||
|
||||
Server Connection Tracking shows open and recent connections.
|
||||
Connection and Request Tracking shows active incoming HTTP requests separately from active outgoing client connections.
|
||||
|
||||
Use it when requests appear stuck, slow, or unexpectedly numerous.
|
||||
Use it when requests appear stuck, slow, or unexpectedly numerous, or when outgoing HTTP activity needs inspection.
|
||||
|
||||
## What You Can Do Here
|
||||
|
||||
- Server Connection Tracking shows open and recent connections.
|
||||
- Incoming HTTP Requests contains one row per request currently executing, including concurrent requests sharing one keep-alive connection.
|
||||
- Outgoing Connections contains YaCy client connections tracked by the outgoing HTTP client.
|
||||
- Filter or limit the view to the symptom being investigated.
|
||||
- Use the observation to decide the next crawler, index, network, or configuration action.
|
||||
|
||||
@@ -38,11 +39,11 @@ Administrator access is required. YaCy protects `_p` pages as administration pag
|
||||
|
||||
Page backend: `source/net/yacy/htroot/Connections_p.java`.
|
||||
|
||||
No request parameters are needed for normal use of this page.
|
||||
No request parameters are needed for normal use of this page. The page refreshes every three seconds.
|
||||
|
||||
## What To Expect
|
||||
|
||||
Expect observations: counts, logs, queues, timing, network rows, thread states, or resource values. Monitoring does not fix the issue by itself; it points to the next page or setting to change.
|
||||
The incoming count falls when synchronous processing returns or asynchronous processing completes, times out, or fails. Its displayed limit applies to remote requests; local requests are displayed but exempt from rejection. This count is not the number of TCP connections or servlet sessions.
|
||||
|
||||
## Related Pages
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ backend_java: source/net/yacy/htroot/PerformanceQueues_p.java
|
||||
|
||||
## Purpose
|
||||
|
||||
Queue Performance shows processing queues and worker behavior.
|
||||
Queue Performance shows processing queues, worker behavior, and concurrency limits.
|
||||
|
||||
Use it to find bottlenecks between crawling, parsing, indexing, and response generation.
|
||||
|
||||
@@ -28,7 +28,7 @@ Monitoring pages read live peer state from queues, logs, network tables, memory
|
||||
|
||||
| Control | Meaning | Values or examples |
|
||||
| --- | --- | --- |
|
||||
| `#[name]#_maxActive` | Enables the named feature. | Integer value. |
|
||||
| `#[name]#_maxActive` | Maximum concurrent activity for the named workload. | Positive integer. The Incoming HTTP Requests row limits active remote requests, not TCP connections or servlet sessions. |
|
||||
|
||||
## Correct Use
|
||||
|
||||
@@ -60,7 +60,9 @@ The table explains values that an agent or script must set deliberately. Paramet
|
||||
| `Crawler Pool_maxActive` | Enables the named feature. | Set only when this option is part of the intended request; otherwise omit it and let YaCy use the page default. |
|
||||
| `Robots.txt Pool_maxActive` | Enables the named feature. | Set only when this option is part of the intended request; otherwise omit it and let YaCy use the page default. |
|
||||
| `crawlPauseRemotesearch` | User or account value. | Set only when this option is part of the intended request; otherwise omit it and let YaCy use the page default. |
|
||||
| `httpd Session Pool_maxActive` | Enables the named feature. | Set only when this option is part of the intended request; otherwise omit it and let YaCy use the page default. |
|
||||
| `poolConfig` | Applies the submitted crawler, robots.txt, and incoming HTTP request limits. | Include this submit parameter and preserve the current values of limits that are not being changed. |
|
||||
| `Incoming HTTP Requests_maxActive` | Positive integer maximum for concurrently active incoming HTTP requests. | Takes effect immediately and is persisted as `httpdMaxBusySessions`; the same value is restored when YaCy restarts. Non-positive values are ignored. |
|
||||
| `httpd Session Pool_maxActive` | Legacy alias for `Incoming HTTP Requests_maxActive`. | Accepted for existing automation, but new integrations should use the corrected parameter name. |
|
||||
|
||||
Example request shape:
|
||||
|
||||
@@ -73,7 +75,7 @@ Content-Type: application/x-www-form-urlencoded
|
||||
|
||||
## What To Expect
|
||||
|
||||
Expect observations: counts, logs, queues, timing, network rows, thread states, or resource values. Monitoring does not fix the issue by itself; it points to the next page or setting to change.
|
||||
The page reports each workload's current activity and concurrency limit. “Incoming HTTP Requests” counts requests currently executing in the servlet pipeline; it is not a TCP connection pool and not an HTTP session count. Submitting `poolConfig` changes the limits immediately. The incoming request limit persists across restart; remote requests exceeding it receive HTTP 503, while local requests remain exempt from rejection.
|
||||
|
||||
## Related Pages
|
||||
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@ backend_java: source/net/yacy/htroot/Status.java
|
||||
|
||||
## Purpose
|
||||
|
||||
Console Status is the operational dashboard for the peer.
|
||||
Console Status is the operational dashboard for the peer. Its Incoming HTTP Requests metric reports requests currently executing and the configured remote-request limit; it does not report TCP connections or servlet sessions.
|
||||
|
||||
Use it first to see identity, uptime, network position, indexing state, and important warnings.
|
||||
|
||||
@@ -64,7 +64,7 @@ GET /Status.html?aquirerelease=...&ResetTraffic=...&continueCrawlJob=...&jobType
|
||||
|
||||
## What To Expect
|
||||
|
||||
Expect observations: counts, logs, queues, timing, network rows, thread states, or resource values. Monitoring does not fix the issue by itself; it points to the next page or setting to change.
|
||||
Expect observations including active incoming HTTP requests and their configured limit. Follow that metric to Connection and Request Tracking for individual requests or Concurrency Limits to change the limit. Local requests count as active but are exempt from rejection.
|
||||
|
||||
## Related Pages
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>YaCy '#[clientname]#': Server Connection Tracking</title>
|
||||
<title>YaCy '#[clientname]#': Connection and Request Tracking</title>
|
||||
#%env/templates/metas.template%#
|
||||
<meta http-equiv="REFRESH" content="3" />
|
||||
</head>
|
||||
@@ -9,9 +9,9 @@
|
||||
#%env/templates/header.template%#
|
||||
#%env/templates/submenuAccessTracker.template%#
|
||||
<script type="text/javascript" src="js/sorttable.js"></script>
|
||||
<h2>Server Connection Tracking</h2>
|
||||
<h3>Incoming Connections</h3>
|
||||
<p>Showing #[numActiveRunning]# active connections from a max. of #[numMax]# allowed incoming connections.</p>
|
||||
<h2>Connection and Request Tracking</h2>
|
||||
<h3>Incoming HTTP Requests</h3>
|
||||
<p><span>Active HTTP requests:</span> #[numActiveRunning]#. <span>Remote-request limit:</span> #[numMax]#. <span>Local requests are exempt.</span></p>
|
||||
<table class="sortable" border="0">
|
||||
<tr class="TableHeader" valign="bottom">
|
||||
<td>Protocol</td>
|
||||
@@ -56,4 +56,4 @@
|
||||
|
||||
#%env/templates/footer.template%#
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -162,23 +162,23 @@
|
||||
|
||||
<form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data" accept-charset="UTF-8" id="ThreadPoolSettings" class="col-sm-12 col-md-6">
|
||||
<input type="hidden" name="transactionToken" value="#[transactionToken]#" />
|
||||
<fieldset><legend>Thread Pool Settings:</legend>
|
||||
<fieldset><legend>Concurrency Limits:</legend>
|
||||
<table border="0">
|
||||
<tr class="TableHeader" valign="bottom">
|
||||
<td>Thread Pool</td>
|
||||
<td>maximum Active</td>
|
||||
<td>current Active</td>
|
||||
<td>Workload</td>
|
||||
<td>Maximum Active</td>
|
||||
<td>Currently Active</td>
|
||||
</tr>
|
||||
#{pool}#
|
||||
<tr class="TableCellDark">
|
||||
<td align="left">#[name]#</td>
|
||||
<td align="left">#(incomingRequests)##[name]#::Incoming HTTP Requests#(/incomingRequests)#</td>
|
||||
<td align="right"><input name="#[name]#_maxActive" type="text" size="8" maxlength="8" value="#[maxActive]#" /></td>
|
||||
<td align="right">#[numActive]#</td>
|
||||
</tr>
|
||||
#{/pool}#
|
||||
<tr class="TableCellLight">
|
||||
<td align="left" colspan="7">
|
||||
<input type="submit" name="poolConfig" class="btn btn-sm btn-primary" value="Enter new Threadpool Configuration" />
|
||||
<input type="submit" name="poolConfig" class="btn btn-sm btn-primary" value="Apply Concurrency Limits" />
|
||||
Changes take effect immediately</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
+3
-3
@@ -74,8 +74,8 @@
|
||||
<dt>Traffic [<a href="Status.html?ResetTraffic=">Reset</a>]</dt>
|
||||
<dd>Proxy: #[trafficProxy]#<br/>Crawler: #[trafficCrawler]#</dd>
|
||||
|
||||
<dt><a href="Connections_p.html">Incoming Connections</a></dt>
|
||||
<dd>Active: #[connectionsActive]# | Max: <a href="PerformanceQueues_p.html#ThreadPoolSettings">#[connectionsMax]#</a></dd>
|
||||
<dt><a href="Connections_p.html">Incoming HTTP Requests</a></dt>
|
||||
<dd><span>Active:</span> #[connectionsActive]# | <span>Limit:</span> <a href="PerformanceQueues_p.html#ThreadPoolSettings">#[connectionsMax]#</a></dd>
|
||||
|
||||
<dt><a href="Crawler_p.html">Queues</a></dt>
|
||||
<dd>
|
||||
@@ -122,4 +122,4 @@
|
||||
|
||||
</dl>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
+14
-8
@@ -860,7 +860,10 @@ This servlet can only be used on operating systems that are currently supported
|
||||
You installed YaCy with a package manager. To update YaCy, use the package manager:==Sie haben YaCy mit einem Paketmanager installiert. Verwenden Sie zum Aktualisieren den Paketmanager:
|
||||
#File: Connections_p.html
|
||||
#---------------------------
|
||||
Incoming Connections==Eingehende Verbindungen
|
||||
Incoming HTTP Requests==Eingehende HTTP-Anfragen
|
||||
Active HTTP requests:==Aktive HTTP-Anfragen:
|
||||
Remote-request limit:==Limit für Remote-Anfragen:
|
||||
Local requests are exempt.==Lokale Anfragen sind ausgenommen.
|
||||
Duration==Dauer
|
||||
Source IP[:Port]==Quell-IP[:Port]
|
||||
Dest. IP[:Port]==Ziel-IP[:Port]
|
||||
@@ -871,7 +874,7 @@ Outgoing Connections==Ausgehende Verbindungen
|
||||
Command==Befehl
|
||||
ID==ID
|
||||
Protocol==Protokoll
|
||||
Server Connection Tracking==Server-Verbindungsverfolgung
|
||||
Connection and Request Tracking==Verbindungs- und Anfrageüberwachung
|
||||
Up-Bytes==Up-Bytes
|
||||
#File: CookieMonitorIncoming_p.html
|
||||
#---------------------------
|
||||
@@ -2324,14 +2327,15 @@ Maximum number of words in cache:==Maximale Wortzahl im Cache:
|
||||
This is is the number of word indexes that shall be held in the==Dies ist die Anzahl der Wort-indexe die während des Indexierens im
|
||||
ram cache during indexing. When YaCy is shut down, this cache must be==RAM-Cache gehalten werden sollen. Sobald YaCy herunterfährt muss dieser Cache
|
||||
flushed to disc; this may last some minutes.==auf die Festplatte gesichert werden; dies kann einige Minuten dauern.
|
||||
Thread Pool Settings:==Threadpool-Einstellungen:
|
||||
maximum Active==max. aktiv
|
||||
current Active==derzeit aktiv
|
||||
Concurrency Limits:==Parallelitätsgrenzen:
|
||||
Maximum Active==Maximal aktiv
|
||||
Currently Active==Derzeit aktiv
|
||||
#-----------------------------
|
||||
|
||||
Description==Beschreibung
|
||||
RAM Cache==RAM-Cache
|
||||
Thread Pool==Thread-Pool
|
||||
Workload==Arbeitslast
|
||||
Incoming HTTP Requests==Eingehende HTTP-Anfragen
|
||||
milliseconds==Millisekunden
|
||||
Exec Time<br />per Busy-Cycle<br />(millis)==Ausführungszeit<br />pro Busy-Zyklus<br />(Millisekunden)
|
||||
Memory Use<br />per Busy-Cycle<br />(kbytes)==Speichernutzung<br />pro Busy-Zyklus<br />(KBytes)
|
||||
@@ -2341,7 +2345,7 @@ Total<br />Cycles==Gesamte<br />Zyklen
|
||||
Total<br />Exec Time==Gesamte<br />Ausführungszeit
|
||||
Total<br />Sleep Time==Gesamte<br />Schlafzeit
|
||||
"Enter New Cache Size"=="Neue Cache-Größe eingeben"
|
||||
"Enter new Threadpool Configuration"=="Neue Threadpool-Konfiguration eingeben"
|
||||
"Apply Concurrency Limits"=="Parallelitätsgrenzen anwenden"
|
||||
"Number of connection requests being blocked awaiting a free connection"=="Anzahl der Verbindungsanfragen, die auf eine freie Verbindung warten"
|
||||
"Number of connections currently being used to execute requests."=="Anzahl der Verbindungen, die aktuell zur Ausführung von Anfragen verwendet werden."
|
||||
"Number of reusable idle connections"=="Anzahl wiederverwendbarer inaktiver Verbindungen"
|
||||
@@ -2930,7 +2934,9 @@ RAM max:==RAM maximal:
|
||||
DISK used:==DISK benutzt:
|
||||
DISK free:==DISK frei:
|
||||
|
||||
Incoming Connections==Eingehende Verbindungen
|
||||
Incoming HTTP Requests==Eingehende HTTP-Anfragen
|
||||
Active:==Aktiv:
|
||||
Limit:==Limit:
|
||||
#Max:Max:
|
||||
Local Crawl==Lokales Crawlen
|
||||
Remote triggered Crawl==eingehende Remote-Crawls
|
||||
|
||||
+14
-8
@@ -946,8 +946,11 @@ automatic update: add the following line to /etc/crontab<br/>0 6 * * * root apt-
|
||||
|
||||
#File: Connections_p.html
|
||||
#---------------------------
|
||||
Server Connection Tracking==Παρακολούθηση σύνδεσης διακομιστή
|
||||
Incoming Connections==Εισερχόμενες συνδέσεις
|
||||
Connection and Request Tracking==Παρακολούθηση συνδέσεων και αιτημάτων
|
||||
Incoming HTTP Requests==Εισερχόμενα αιτήματα HTTP
|
||||
Active HTTP requests:==Ενεργά αιτήματα HTTP:
|
||||
Remote-request limit:==Όριο απομακρυσμένων αιτημάτων:
|
||||
Local requests are exempt.==Τα τοπικά αιτήματα εξαιρούνται.
|
||||
Protocol==Πρωτόκολλο
|
||||
Duration==Διάρκεια
|
||||
Source IP[:Port]==IP Πηγής[:Port]
|
||||
@@ -2551,7 +2554,7 @@ Search Event Cache==Αναζήτηση στην κρυφή μνήμη συμβά
|
||||
"Reverse Word Index"=="Ευρετήριο αντίστροφης λέξης"
|
||||
"Submit New Values"=="Υποβολή νέων τιμών"
|
||||
"Enter New Cache Size"=="Εισαγάγετε νέο μέγεθος προσωρινής μνήμης"
|
||||
"Enter new Threadpool Configuration"=="Εισαγάγετε τη νέα διαμόρφωση Threadpool"
|
||||
"Apply Concurrency Limits"=="Εφαρμογή ορίων ταυτόχρονης εκτέλεσης"
|
||||
"Total maximum number of simultaneously open connections in the pool"=="Συνολικός μέγιστος αριθμός ταυτόχρονων ανοιχτών συνδέσεων στην πισίνα"
|
||||
"Number of connections currently being used to execute requests."=="Αριθμός συνδέσεων που χρησιμοποιούνται αυτήν τη στιγμή για την εκτέλεση αιτημάτων."
|
||||
"Number of reusable idle connections"=="Αριθμός επαναχρησιμοποιήσιμων συνδέσεων αδράνειας"
|
||||
@@ -2605,10 +2608,11 @@ Maximum number of words in cache:==Μέγιστος αριθμός λέξεων
|
||||
This is is the number of word indexes that shall be held in the==Αυτός είναι ο αριθμός των ευρετηρίων λέξεων που θα διατηρούνται στο
|
||||
ram cache during indexing. When YaCy is shut down, this cache must be==ram cache κατά τη δημιουργία ευρετηρίου. Όταν η YaCy τερματίζεται, αυτή η προσωρινή μνήμη πρέπει να είναι
|
||||
flushed to disc; this may last some minutes.==ξεπλυθεί σε δίσκο? αυτό μπορεί να διαρκέσει μερικά λεπτά.
|
||||
Thread Pool Settings:==Ρυθμίσεις ομάδας νημάτων:
|
||||
Thread Pool==Πισίνα με νήματα
|
||||
maximum Active==μέγιστο Ενεργό
|
||||
current Active==τρέχουσα Ενεργή
|
||||
Concurrency Limits:==Όρια ταυτόχρονης εκτέλεσης:
|
||||
Workload==Φόρτος εργασίας
|
||||
Incoming HTTP Requests==Εισερχόμενα αιτήματα HTTP
|
||||
Maximum Active==Μέγιστο ενεργών
|
||||
Currently Active==Τρέχοντα ενεργά
|
||||
Outgoing connections pools settings :==Ρυθμίσεις πισίνας εξερχόμενων συνδέσεων :
|
||||
Connection Pool==Πισίνα σύνδεσης
|
||||
Total maximum==Συνολικό μέγιστο
|
||||
@@ -3374,7 +3378,9 @@ RAM used:==RAM που χρησιμοποιείται:
|
||||
RAM max:==Μέγιστο RAM:
|
||||
DISK used:==DISK που χρησιμοποιείται:
|
||||
DISK free:==Χωρίς Δίσκο:
|
||||
Incoming Connections==Εισερχόμενες συνδέσεις
|
||||
Incoming HTTP Requests==Εισερχόμενα αιτήματα HTTP
|
||||
Active:==Ενεργά:
|
||||
Limit:==Όριο:
|
||||
Queues==Ουρές
|
||||
Local Crawl==Τοπική ανίχνευση
|
||||
(paused)==(σε παύση)
|
||||
|
||||
+14
-8
@@ -818,7 +818,10 @@ You installed YaCy with a package manager. To update YaCy, use the package manag
|
||||
|
||||
#File: Connections_p.html
|
||||
#---------------------------
|
||||
Incoming Connections==Conexiones entrantes
|
||||
Incoming HTTP Requests==Solicitudes HTTP entrantes
|
||||
Active HTTP requests:==Solicitudes HTTP activas:
|
||||
Remote-request limit:==Límite de solicitudes remotas:
|
||||
Local requests are exempt.==Las solicitudes locales están exentas.
|
||||
Duration==Duración
|
||||
Source IP[:Port]==IP origen[:Port]
|
||||
Dest. IP[:Port]==IP destino.[:Port]
|
||||
@@ -826,7 +829,7 @@ Outgoing Connections==Conexiones salientes
|
||||
Command==Comando
|
||||
ID==ID
|
||||
Protocol==Protocolo
|
||||
Server Connection Tracking==Seguimiento de la conexión del servidor
|
||||
Connection and Request Tracking==Seguimiento de conexiones y solicitudes
|
||||
Up-Bytes==Up-Bytes
|
||||
#-----------------------------
|
||||
|
||||
@@ -2247,12 +2250,13 @@ Maximum number of words in cache:==Número máximo de palabras en cache:
|
||||
This is is the number of word indexes that shall be held in the==Este es el número de índices de palabras que se mantendrá en el
|
||||
ram cache during indexing. When YaCy is shut down, this cache must be==caché de RAM durante la indexación. Cuando YaCy se apaga, esta caché debe ser
|
||||
flushed to disc; this may last some minutes.==Enrojecido en disco; esto puede durar algunos minutos.
|
||||
Thread Pool Settings:==Configuración del grupo de discusión:
|
||||
maximum Active==máximo activo
|
||||
current Active==Activo actual
|
||||
Concurrency Limits:==Límites de concurrencia:
|
||||
Maximum Active==Máximo de activos
|
||||
Currently Active==Activos actualmente
|
||||
Description==Descripción
|
||||
RAM Cache==Cache RAM
|
||||
Thread Pool==Pool de threads
|
||||
Workload==Carga de trabajo
|
||||
Incoming HTTP Requests==Solicitudes HTTP entrantes
|
||||
milliseconds==milisegundos
|
||||
Exec Time<br />per Busy-Cycle<br />(millis)==Tiempo de ejecución<br />por ciclo ocupado<br />(millis)
|
||||
Memory Use<br />per Busy-Cycle<br />(kbytes)==Uso de memoria<br />por ciclo ocupado<br />(kbytes)
|
||||
@@ -2262,7 +2266,7 @@ Total<br />Cycles==Total de ciclos<br />
|
||||
Total<br />Exec Time==Total<br />Tiempo de ejecución
|
||||
Total<br />Sleep Time==Total<br />Tiempo de sueño
|
||||
"Enter New Cache Size"=="Entrar en el nuevo tamaño de cache"
|
||||
"Enter new Threadpool Configuration"=="Introducir nueva configuración de Threadpool"
|
||||
"Apply Concurrency Limits"=="Aplicar límites de concurrencia"
|
||||
"Number of connection requests being blocked awaiting a free connection"=="Número de solicitudes de conexión bloqueadas a la espera de una conexión libre"
|
||||
"Number of connections currently being used to execute requests."=="Número de conexiones que se utilizan actualmente para ejecutar solicitudes"."
|
||||
"Number of reusable idle connections"=="Número de conexiones inactivas reutilizables"
|
||||
@@ -2842,7 +2846,9 @@ RAM used:==Consumo de RAM:
|
||||
RAM max:==Máximo de RAM:
|
||||
DISK used:==Consumo de DISCO:
|
||||
DISK free:==Espacio libre del DISCO:
|
||||
Incoming Connections==Conexiones entrantes
|
||||
Incoming HTTP Requests==Solicitudes HTTP entrantes
|
||||
Active:==Activas:
|
||||
Limit:==Límite:
|
||||
Local Crawl==Rawl local
|
||||
Remote triggered Crawl==Detonado a distancia Crawl
|
||||
Pre-Queueing==Pre-quieing
|
||||
|
||||
+14
-8
@@ -609,7 +609,10 @@ only main releases==Seulement les principales versions
|
||||
|
||||
#File: Connections_p.html
|
||||
#---------------------------
|
||||
Incoming Connections==Connexions entrantes
|
||||
Incoming HTTP Requests==Requêtes HTTP entrantes
|
||||
Active HTTP requests:==Requêtes HTTP actives :
|
||||
Remote-request limit:==Limite des requêtes distantes :
|
||||
Local requests are exempt.==Les requêtes locales sont exemptées.
|
||||
Protocol==Protocole
|
||||
Duration==Durée
|
||||
Source IP[:Port]==Source-IP[:Port]
|
||||
@@ -617,7 +620,7 @@ Dest. IP[:Port]==Dest.-IP[:Port]
|
||||
Command==Commande
|
||||
ID==ID
|
||||
Outgoing Connections==Connexions sortantes
|
||||
Server Connection Tracking==Suivi de la connexion du serveur
|
||||
Connection and Request Tracking==Suivi des connexions et des requêtes
|
||||
Up-Bytes==Up-Bytes
|
||||
#-----------------------------
|
||||
|
||||
@@ -1335,11 +1338,11 @@ If this is a big number, it shows that the caching works efficiently.==Ce nombre
|
||||
This is is the number of word indexes that shall be held in the==C'est le nombre d'index de mots qui doivent être gardés dans le
|
||||
ram cache during indexing. When YaCy is shut down, this cache must be==cache mémoire pendant l'indexation. Quand YaCy est stoppé, ce cache doit
|
||||
flushed to disc; this may last some minutes.==être transféré sur disque; cela peut durer quelques minutes.
|
||||
maximum Active==max. actif
|
||||
current Active==actif courrant
|
||||
Maximum Active==Maximum actif
|
||||
Currently Active==Actuellement actif
|
||||
milliseconds==millisecondes
|
||||
"Enter New Cache Size"=="Saisissez une nouvelle taille de cache"
|
||||
"Enter new Threadpool Configuration"=="Saisissez une nouvelle configuration Threadpool"
|
||||
"Apply Concurrency Limits"=="Appliquer les limites de concurrence"
|
||||
"Number of connection requests being blocked awaiting a free connection"=="Nombre de demandes de connexion bloquées en attendant une connexion libre"
|
||||
"Number of connections currently being used to execute requests."=="Nombre de connexions actuellement utilisées pour exécuter des requêtes."
|
||||
"Number of reusable idle connections"=="Nombre de connexions de ralenti réutilisables"
|
||||
@@ -1381,8 +1384,9 @@ The maximum of this caches can be set below.==Le maximum de ces caches peut êtr
|
||||
This is the maximum age of a word in an index in minutes.==C'est l'âge maximum d'un mot dans un index en minutes.
|
||||
This is the minimum age of a word in an index in minutes.==C'est l'âge minimum d'un mot dans un index en minutes.
|
||||
Thread==Thread
|
||||
Thread Pool==Pool de fils
|
||||
Thread Pool Settings:==Paramètres de la piscine de filetage:
|
||||
Workload==Charge de travail
|
||||
Incoming HTTP Requests==Requêtes HTTP entrantes
|
||||
Concurrency Limits:==Limites de concurrence :
|
||||
Total maximum==Maximum total
|
||||
Total<br />Block Time==Durée totale du bloc<br />
|
||||
Total<br />Cycles==Total des cycles<br />
|
||||
@@ -1599,7 +1603,9 @@ RAM used:==RAM utilisée:
|
||||
RAM max:==RAM max:
|
||||
DISK used:==DISK utilisé:
|
||||
DISK free:==DISK libre:
|
||||
Incoming Connections==Connections entrantes
|
||||
Incoming HTTP Requests==Requêtes HTTP entrantes
|
||||
Active:==Actives :
|
||||
Limit:==Limite :
|
||||
Local Crawl==Balayage local
|
||||
(paused)==(en pause)
|
||||
Remote triggered Crawl==Balayages distants en cours
|
||||
|
||||
+14
-8
@@ -936,8 +936,11 @@ automatic update: add the following line to /etc/crontab<br/>0 6 * * * root apt-
|
||||
|
||||
#File: Connections_p.html
|
||||
#---------------------------
|
||||
Server Connection Tracking==सर्वर कनेक्शन ट्रैकिंग
|
||||
Incoming Connections==इनकमिंग कनेक्शन
|
||||
Connection and Request Tracking==कनेक्शन और अनुरोध ट्रैकिंग
|
||||
Incoming HTTP Requests==आने वाले HTTP अनुरोध
|
||||
Active HTTP requests:==सक्रिय HTTP अनुरोध:
|
||||
Remote-request limit:==दूरस्थ अनुरोध सीमा:
|
||||
Local requests are exempt.==स्थानीय अनुरोधों पर यह सीमा लागू नहीं होती।
|
||||
Protocol==शिष्टाचार
|
||||
Duration==अवधि
|
||||
Source IP[:Port]==स्रोत IP[:Port]
|
||||
@@ -2541,7 +2544,7 @@ Search Event Cache==इवेंट कैश खोजें
|
||||
"Reverse Word Index"=="रिवर्स वर्ड इंडेक्स"
|
||||
"Submit New Values"=="नए मान सबमिट करें"
|
||||
"Enter New Cache Size"=="नया कैश आकार दर्ज करें"
|
||||
"Enter new Threadpool Configuration"=="नया थ्रेडपूल कॉन्फ़िगरेशन दर्ज करें"
|
||||
"Apply Concurrency Limits"=="समवर्ती सीमाएँ लागू करें"
|
||||
"Total maximum number of simultaneously open connections in the pool"=="पूल में एक साथ खुले कनेक्शनों की कुल अधिकतम संख्या"
|
||||
"Number of connections currently being used to execute requests."=="अनुरोधों को निष्पादित करने के लिए वर्तमान में उपयोग किए जा रहे कनेक्शनों की संख्या।"
|
||||
"Number of reusable idle connections"=="पुन: प्रयोज्य निष्क्रिय कनेक्शनों की संख्या"
|
||||
@@ -2595,10 +2598,11 @@ Maximum number of words in cache:==कैश में शब्दों की
|
||||
This is is the number of word indexes that shall be held in the==यह शब्द अनुक्रमणिकाओं की संख्या है जो इसमें रखी जाएंगी
|
||||
ram cache during indexing. When YaCy is shut down, this cache must be==अनुक्रमण के दौरान रैम कैश। जब YaCy बंद हो जाता है, तो यह कैश अवश्य होना चाहिए
|
||||
flushed to disc; this may last some minutes.==डिस्क पर फ्लश किया गया; यह कुछ मिनटों तक चल सकता है.
|
||||
Thread Pool Settings:==थ्रेड पूल सेटिंग्स:
|
||||
Thread Pool==धागा पूल
|
||||
maximum Active==अधिकतम सक्रिय
|
||||
current Active==वर्तमान सक्रिय
|
||||
Concurrency Limits:==समवर्ती सीमा:
|
||||
Workload==कार्यभार
|
||||
Incoming HTTP Requests==आने वाले HTTP अनुरोध
|
||||
Maximum Active==अधिकतम सक्रिय
|
||||
Currently Active==वर्तमान में सक्रिय
|
||||
Outgoing connections pools settings :==आउटगोइंग कनेक्शन पूल सेटिंग्स:
|
||||
Connection Pool==कनेक्शन पूल
|
||||
Total maximum==कुल अधिकतम
|
||||
@@ -3364,7 +3368,9 @@ RAM used:==रैम का उपयोग किया गया:
|
||||
RAM max:==रैम अधिकतम:
|
||||
DISK used:==डिस्क का उपयोग किया गया:
|
||||
DISK free:==डिस्क मुक्त:
|
||||
Incoming Connections==इनकमिंग कनेक्शन
|
||||
Incoming HTTP Requests==आने वाले HTTP अनुरोध
|
||||
Active:==सक्रिय:
|
||||
Limit:==सीमा:
|
||||
Queues==कतारों
|
||||
Local Crawl==स्थानीय क्रॉल
|
||||
(paused)==(रुका हुआ)
|
||||
|
||||
+14
-8
@@ -824,7 +824,10 @@ You installed YaCy with a package manager. To update YaCy, use the package manag
|
||||
|
||||
#File: Connections_p.html
|
||||
#---------------------------
|
||||
Incoming Connections==Connessioni in entrata
|
||||
Incoming HTTP Requests==Richieste HTTP in ingresso
|
||||
Active HTTP requests:==Richieste HTTP attive:
|
||||
Remote-request limit:==Limite richieste remote:
|
||||
Local requests are exempt.==Le richieste locali sono esenti.
|
||||
Duration==Durata
|
||||
Source IP[:Port]==IP sorgente[:Port]
|
||||
Dest. IP[:Port]==IP dest.[:Port]
|
||||
@@ -832,7 +835,7 @@ Outgoing Connections==Connessioni in uscita
|
||||
Command==Comando
|
||||
ID==ID
|
||||
Protocol==Protocollo
|
||||
Server Connection Tracking==Tracciamento connessione server
|
||||
Connection and Request Tracking==Monitoraggio di connessioni e richieste
|
||||
Up-Bytes==Up-Byte
|
||||
#-----------------------------
|
||||
|
||||
@@ -2253,12 +2256,13 @@ Maximum number of words in cache:==Numero massimo di parole nella cache:
|
||||
This is is the number of word indexes that shall be held in the==Questo è il numero di indici di parola che si terrà nel
|
||||
ram cache during indexing. When YaCy is shut down, this cache must be==ram cache during indexing. When YaCy is shut down, this cache must be
|
||||
flushed to disc; this may last some minutes.==asciugato sul disco; questo può durare alcuni minuti.
|
||||
Thread Pool Settings:==Impostazioni della piscina filettata:
|
||||
maximum Active==massimo attivo
|
||||
current Active==corrente attiva
|
||||
Concurrency Limits:==Limiti di concorrenza:
|
||||
Maximum Active==Massimo attivo
|
||||
Currently Active==Attualmente attivi
|
||||
Description==Descrizione
|
||||
RAM Cache==RAM Cache
|
||||
Thread Pool==Piscina filettata
|
||||
Workload==Carico di lavoro
|
||||
Incoming HTTP Requests==Richieste HTTP in ingresso
|
||||
milliseconds==millisecondi
|
||||
Exec Time<br />per Busy-Cycle<br />(millis)==Exec Time<br />per ciclo occupato<br />(millis)
|
||||
Memory Use<br />per Busy-Cycle<br />(kbytes)==Memoria Usa<br />per ciclo occupato<br />(kbyte)
|
||||
@@ -2268,7 +2272,7 @@ Total<br />Cycles==Totale cicli<br />
|
||||
Total<br />Exec Time==Tempo totale di esecuzione<br />
|
||||
Total<br />Sleep Time==Totale<br />Orario di sonno
|
||||
"Enter New Cache Size"=="Inserisci nuova dimensione della cache"
|
||||
"Enter new Threadpool Configuration"=="Inserisci nuova configurazione di Threadpool"
|
||||
"Apply Concurrency Limits"=="Applica limiti di concorrenza"
|
||||
"Number of connection requests being blocked awaiting a free connection"=="Numero di richieste di connessione bloccate in attesa di connessione gratuita"
|
||||
"Number of connections currently being used to execute requests."=="Numero di connessioni attualmente utilizzate per eseguire le richieste."
|
||||
"Number of reusable idle connections"=="Numero di connessioni inattivo riutilizzabili"
|
||||
@@ -2848,7 +2852,9 @@ RAM used:==RAM usata:
|
||||
RAM max:==RAM massima:
|
||||
DISK used:==DISCO usato:
|
||||
DISK free:==DISCO libero:
|
||||
Incoming Connections==Connessioni in entrata
|
||||
Incoming HTTP Requests==Richieste HTTP in ingresso
|
||||
Active:==Attive:
|
||||
Limit:==Limite:
|
||||
Local Crawl==Crawl localeCity name (optional, probably does not need a translation)
|
||||
Remote triggered Crawl==Crawl attivato da remoto
|
||||
Pre-Queueing==Pre-Quéeing
|
||||
|
||||
+14
-8
@@ -941,8 +941,11 @@ automatic update: add the following line to /etc/crontab<br/>0 6 * * * root apt-
|
||||
|
||||
#File: Connections_p.html
|
||||
#---------------------------
|
||||
Server Connection Tracking==サーバー接続の追跡
|
||||
Incoming Connections==着信接続
|
||||
Connection and Request Tracking==接続とリクエストの追跡
|
||||
Incoming HTTP Requests==受信 HTTP リクエスト
|
||||
Active HTTP requests:==アクティブな HTTP リクエスト:
|
||||
Remote-request limit:==リモートリクエストの上限:
|
||||
Local requests are exempt.==ローカルリクエストは対象外です。
|
||||
Protocol==プロトコル
|
||||
Duration==間隔
|
||||
Source IP[:Port]==ソース IP[:ポート]
|
||||
@@ -2546,7 +2549,7 @@ Search Event Cache==イベントキャッシュの検索
|
||||
"Reverse Word Index"=="逆引き単語索引"
|
||||
"Submit New Values"=="新しい値を送信する"
|
||||
"Enter New Cache Size"=="新しいキャッシュ サイズを入力してください"
|
||||
"Enter new Threadpool Configuration"=="新しいスレッドプール構成を入力してください"
|
||||
"Apply Concurrency Limits"=="同時実行数の制限を適用"
|
||||
"Total maximum number of simultaneously open connections in the pool"=="プール内で同時にオープンされる接続の合計最大数"
|
||||
"Number of connections currently being used to execute requests."=="リクエストを実行するために現在使用されている接続の数。"
|
||||
"Number of reusable idle connections"=="再利用可能なアイドル接続の数"
|
||||
@@ -2600,10 +2603,11 @@ Maximum number of words in cache:==キャッシュ内の最大ワード数:
|
||||
This is is the number of word indexes that shall be held in the==これは、ファイル内に保持される単語インデックスの数です。
|
||||
ram cache during indexing. When YaCy is shut down, this cache must be==インデックス作成中の RAM キャッシュ。 YaCy がシャットダウンされている場合、このキャッシュは
|
||||
flushed to disc; this may last some minutes.==ディスクにフラッシュされました。これは数分間続く場合があります。
|
||||
Thread Pool Settings:==スレッドプール設定:
|
||||
Thread Pool==スレッドプール
|
||||
maximum Active==最大アクティブ
|
||||
current Active==現在アクティブ
|
||||
Concurrency Limits:==同時実行数の制限:
|
||||
Workload==ワークロード
|
||||
Incoming HTTP Requests==受信 HTTP リクエスト
|
||||
Maximum Active==最大アクティブ数
|
||||
Currently Active==現在のアクティブ数
|
||||
Outgoing connections pools settings :==発信接続プールの設定:
|
||||
Connection Pool==接続プール
|
||||
Total maximum==合計最大値
|
||||
@@ -3369,7 +3373,9 @@ RAM used:==使われているRAM:
|
||||
RAM max:==RAMの最大:
|
||||
DISK used:==使われているディスク:
|
||||
DISK free:==フリーなディスク:
|
||||
Incoming Connections==着信接続
|
||||
Incoming HTTP Requests==受信 HTTP リクエスト
|
||||
Active:==アクティブ:
|
||||
Limit:==上限:
|
||||
Queues==キュー
|
||||
Local Crawl==ローカル キュー
|
||||
(paused)==(一時停止)
|
||||
|
||||
+14
-8
@@ -936,8 +936,11 @@ automatic update: add the following line to /etc/crontab<br/>0 6 * * * root apt-
|
||||
|
||||
#File: Connections_p.html
|
||||
#---------------------------
|
||||
Server Connection Tracking==서버 연결 추적
|
||||
Incoming Connections==들어오는 연결
|
||||
Connection and Request Tracking==연결 및 요청 추적
|
||||
Incoming HTTP Requests==수신 HTTP 요청
|
||||
Active HTTP requests:==활성 HTTP 요청:
|
||||
Remote-request limit:==원격 요청 제한:
|
||||
Local requests are exempt.==로컬 요청은 제한에서 제외됩니다.
|
||||
Protocol==규약
|
||||
Duration==지속
|
||||
Source IP[:Port]==소스 IP[:포트]
|
||||
@@ -2541,7 +2544,7 @@ Search Event Cache==이벤트 캐시 검색
|
||||
"Reverse Word Index"=="역방향 단어 색인"
|
||||
"Submit New Values"=="새 값 제출"
|
||||
"Enter New Cache Size"=="새 캐시 크기 입력"
|
||||
"Enter new Threadpool Configuration"=="새 스레드풀 구성 입력"
|
||||
"Apply Concurrency Limits"=="동시 실행 제한 적용"
|
||||
"Total maximum number of simultaneously open connections in the pool"=="풀에서 동시에 열려 있는 총 최대 연결 수"
|
||||
"Number of connections currently being used to execute requests."=="현재 요청을 실행하는 데 사용되는 연결 수입니다."
|
||||
"Number of reusable idle connections"=="재사용 가능한 유휴 연결 수"
|
||||
@@ -2595,10 +2598,11 @@ Maximum number of words in cache:==캐시의 최대 단어 수:
|
||||
This is is the number of word indexes that shall be held in the==이는 데이터베이스에 보관될 단어 인덱스의 수입니다.
|
||||
ram cache during indexing. When YaCy is shut down, this cache must be==인덱싱 중 RAM 캐시. YaCy이 종료되면 이 캐시는 다음과 같아야 합니다.
|
||||
flushed to disc; this may last some minutes.==디스크에 플러시됩니다. 몇 분 정도 지속될 수 있습니다.
|
||||
Thread Pool Settings:==스레드 풀 설정:
|
||||
Thread Pool==스레드 풀
|
||||
maximum Active==최대 활성
|
||||
current Active==현재 활성
|
||||
Concurrency Limits:==동시 실행 제한:
|
||||
Workload==워크로드
|
||||
Incoming HTTP Requests==수신 HTTP 요청
|
||||
Maximum Active==최대 활성
|
||||
Currently Active==현재 활성
|
||||
Outgoing connections pools settings :==나가는 연결 풀 설정:
|
||||
Connection Pool==연결 풀
|
||||
Total maximum==총 최대치
|
||||
@@ -3364,7 +3368,9 @@ RAM used:==사용된 RAM:
|
||||
RAM max:==최대 RAM:
|
||||
DISK used:==사용된 디스크:
|
||||
DISK free:==여유 디스크:
|
||||
Incoming Connections==들어오는 연결
|
||||
Incoming HTTP Requests==수신 HTTP 요청
|
||||
Active:==활성:
|
||||
Limit:==제한:
|
||||
Queues==대기열
|
||||
Local Crawl==로컬 크롤링
|
||||
(paused)==(일시중지됨)
|
||||
|
||||
+34
-16
@@ -2654,11 +2654,20 @@
|
||||
|
||||
<file original="Connections_p.html" source-language="en" datatype="html">
|
||||
<body>
|
||||
<trans-unit id="da1cdd7c" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Server Connection Tracking</source>
|
||||
<trans-unit id="a23473" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Connection and Request Tracking</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="14f5d45b" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Incoming Connections</source>
|
||||
<trans-unit id="dfe35a22" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Incoming HTTP Requests</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="89681f98" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Active HTTP requests:</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="18ee22d7" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Remote-request limit:</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="de4245bc" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Local requests are exempt.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="c8e4f2b8" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Protocol</source>
|
||||
@@ -7136,8 +7145,8 @@
|
||||
<trans-unit id="25753af9" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>"Enter New Cache Size"</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="9f9296dc" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>"Enter new Threadpool Configuration"</source>
|
||||
<trans-unit id="f80e9589" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>"Apply Concurrency Limits"</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="74791d75" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>"Total maximum number of simultaneously open connections in the pool"</source>
|
||||
@@ -7298,17 +7307,20 @@
|
||||
<trans-unit id="35cca64c" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>flushed to disc; this may last some minutes.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="ca387229" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Thread Pool Settings:</source>
|
||||
<trans-unit id="c99adf55" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Concurrency Limits:</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="d2facc72" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Thread Pool</source>
|
||||
<trans-unit id="5f8ff97" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Workload</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="4aeef926" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>maximum Active</source>
|
||||
<trans-unit id="f35c546" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Maximum Active</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="4f5fabad" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>current Active</source>
|
||||
<trans-unit id="51dc7be0" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Currently Active</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="dfe35a22" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Incoming HTTP Requests</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="82717ee5" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Outgoing connections pools settings :</source>
|
||||
@@ -9427,8 +9439,14 @@
|
||||
<trans-unit id="94e8670b" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>DISK free:</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="14f5d45b" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Incoming Connections</source>
|
||||
<trans-unit id="dfe35a22" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Incoming HTTP Requests</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="1df8f9d4" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Active:</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="87ab17ff" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Limit:</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="90d8f5a2" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Queues</source>
|
||||
|
||||
+14
-8
@@ -951,8 +951,11 @@ automatic update: add the following line to /etc/crontab<br/>0 6 * * * root apt-
|
||||
|
||||
#File: Connections_p.html
|
||||
#---------------------------
|
||||
Server Connection Tracking==Śledzenie połączeń serwera
|
||||
Incoming Connections==Połączenia przychodzące
|
||||
Connection and Request Tracking==Śledzenie połączeń i żądań
|
||||
Incoming HTTP Requests==Przychodzące żądania HTTP
|
||||
Active HTTP requests:==Aktywne żądania HTTP:
|
||||
Remote-request limit:==Limit żądań zdalnych:
|
||||
Local requests are exempt.==Żądania lokalne są wyłączone z limitu.
|
||||
Protocol==Protokół
|
||||
Duration==Czas trwania
|
||||
Source IP[:Port]==Źródłowy IP[:Port]
|
||||
@@ -2556,7 +2559,7 @@ Search Event Cache==Pamięć podręczna zdarzeń wyszukiwania
|
||||
"Reverse Word Index"=="Odwrotny indeks słów"
|
||||
"Submit New Values"=="Zapisz nowe wartości"
|
||||
"Enter New Cache Size"=="Wprowadź nowy rozmiar pamięci podręcznej"
|
||||
"Enter new Threadpool Configuration"=="Wprowadź nową konfigurację puli wątków"
|
||||
"Apply Concurrency Limits"=="Zastosuj limity współbieżności"
|
||||
"Total maximum number of simultaneously open connections in the pool"=="Łączna maksymalna liczba jednocześnie otwartych połączeń w puli"
|
||||
"Number of connections currently being used to execute requests."=="Liczba połączeń aktualnie używanych do wykonywania żądań."
|
||||
"Number of reusable idle connections"=="Liczba wielokrotnego użytku bezczynnych połączeń"
|
||||
@@ -2610,10 +2613,11 @@ Maximum number of words in cache:==Maksymalna liczba słów w pamięci podręczn
|
||||
This is is the number of word indexes that shall be held in the==To jest liczba indeksów słów, które mają być przechowywane w
|
||||
ram cache during indexing. When YaCy is shut down, this cache must be==pamięci podręcznej RAM podczas indeksowania. Gdy YaCy jest wyłączane, ta pamięć podręczna musi zostać
|
||||
flushed to disc; this may last some minutes.==zapisana na dysk; może to potrwać kilka minut.
|
||||
Thread Pool Settings:==Ustawienia puli wątków:
|
||||
Thread Pool==Pula wątków
|
||||
maximum Active==maks. aktywnych
|
||||
current Active==obecnie aktywnych
|
||||
Concurrency Limits:==Limity współbieżności:
|
||||
Workload==Obciążenie
|
||||
Incoming HTTP Requests==Przychodzące żądania HTTP
|
||||
Maximum Active==Maksymalna liczba aktywnych
|
||||
Currently Active==Obecnie aktywne
|
||||
Outgoing connections pools settings :==Ustawienia pul połączeń wychodzących:
|
||||
Connection Pool==Pula połączeń
|
||||
Total maximum==Łączne maksimum
|
||||
@@ -3379,7 +3383,9 @@ RAM used:==Użyty RAM:
|
||||
RAM max:==Maks. RAM:
|
||||
DISK used:==Użyty dysk:
|
||||
DISK free:==Wolny dysk:
|
||||
Incoming Connections==Połączenia przychodzące
|
||||
Incoming HTTP Requests==Przychodzące żądania HTTP
|
||||
Active:==Aktywne:
|
||||
Limit:==Limit:
|
||||
Queues==Kolejki
|
||||
Local Crawl==Crawl lokalny
|
||||
(paused)==(wstrzymane)
|
||||
|
||||
+14
-8
@@ -885,8 +885,11 @@ manual update:<br/>apt-get update && apt-get install yacy==обновл
|
||||
automatic update: add the following line to /etc/crontab<br/>0 6 * * * root apt-get update && apt-get -y --force-yes install yacy==автоматическое обновление: добавьте следующую строку в /etc/crontab<br/>0 6 * * * root apt-get update && apt-get -y --force-yes установить yacy
|
||||
#File: Connections_p.html
|
||||
#---------------------------
|
||||
Server Connection Tracking==Отслеживание соединений с сервером
|
||||
Incoming Connections==Входящие соединения
|
||||
Connection and Request Tracking==Отслеживание соединений и запросов
|
||||
Incoming HTTP Requests==Входящие HTTP-запросы
|
||||
Active HTTP requests:==Активные HTTP-запросы:
|
||||
Remote-request limit:==Лимит удалённых запросов:
|
||||
Local requests are exempt.==Локальные запросы не ограничиваются.
|
||||
Duration==Длительность
|
||||
Up-Bytes==Размер
|
||||
Source IP[:Port]==IP-адрес источника[:порт]
|
||||
@@ -2258,10 +2261,11 @@ Maximum number of words in cache:==Максимальное число слов
|
||||
This is is the number of word indexes that shall be held in the==Это число слов индекса, находящихся
|
||||
ram cache during indexing. When YaCy is shut down, this cache must be==в оперативной памяти во время индексирования. Когда YaCy выключается, содержимое кэша
|
||||
flushed to disc; this may last some minutes.==сохраняется на диск; это может занять несколько минут.
|
||||
Thread Pool Settings:==Настройка пула:
|
||||
Thread Pool==Пул
|
||||
maximum Active==Максимум возможно
|
||||
current Active==В данный момент
|
||||
Concurrency Limits:==Ограничения параллелизма:
|
||||
Workload==Рабочая нагрузка
|
||||
Incoming HTTP Requests==Входящие HTTP-запросы
|
||||
Maximum Active==Максимум активных
|
||||
Currently Active==Активно сейчас
|
||||
#-----------------------------
|
||||
|
||||
"Submit New Delay Values"=="Отправьте новые значения задержки"
|
||||
@@ -2270,7 +2274,7 @@ current Active==В данный момент
|
||||
"Reverse Word Index"=="Обратный указатель слов"
|
||||
"Submit New Values"=="Отправить новые значения"
|
||||
"Enter New Cache Size"=="Введите новый размер кэша"
|
||||
"Enter new Threadpool Configuration"=="Введите новую конфигурацию пула потоков"
|
||||
"Apply Concurrency Limits"=="Применить ограничения параллелизма"
|
||||
"Total maximum number of simultaneously open connections in the pool"=="Общее максимальное количество одновременно открытых соединений в пуле"
|
||||
"Number of connections currently being used to execute requests."=="Количество соединений, используемых в данный момент для выполнения запросов."
|
||||
"Number of reusable idle connections"=="Количество многоразовых простаивающих соединений"
|
||||
@@ -2863,7 +2867,9 @@ RAM max:==RAM максимум:
|
||||
DISK used:==На диске используется:
|
||||
DISK free:==На диске свободно:
|
||||
|
||||
Incoming Connections==Входящие соединения
|
||||
Incoming HTTP Requests==Входящие HTTP-запросы
|
||||
Active:==Активно:
|
||||
Limit:==Лимит:
|
||||
Local Crawl==Локальный индексатор
|
||||
Remote triggered Crawl==Удалённый индексатор
|
||||
Pre-Queueing==Предварительная очередь
|
||||
|
||||
+14
-8
@@ -945,8 +945,11 @@ automatic update: add the following line to /etc/crontab<br/>0 6 * * * root apt-
|
||||
|
||||
#File: Connections_p.html
|
||||
#---------------------------
|
||||
Server Connection Tracking==Sledovanie pripojenia k serveru
|
||||
Incoming Connections==Prichadzajuce spojenia
|
||||
Connection and Request Tracking==Sledovanie pripojení a požiadaviek
|
||||
Incoming HTTP Requests==Prichádzajúce HTTP požiadavky
|
||||
Active HTTP requests:==Aktívne HTTP požiadavky:
|
||||
Remote-request limit:==Limit vzdialených požiadaviek:
|
||||
Local requests are exempt.==Lokálne požiadavky sú vyňaté.
|
||||
Protocol==Protokol
|
||||
Duration==Trvanie
|
||||
Source IP[:Port]==Zdrojova-IP[:Port]
|
||||
@@ -2550,7 +2553,7 @@ Search Event Cache==Vyhľadajte vyrovnávaciu pamäť udalostí
|
||||
"Reverse Word Index"=="Obrátený index slov"
|
||||
"Submit New Values"=="Odoslať nové hodnoty"
|
||||
"Enter New Cache Size"=="Zadajte novú veľkosť vyrovnávacej pamäte"
|
||||
"Enter new Threadpool Configuration"=="Zadajte novú konfiguráciu Threadpool"
|
||||
"Apply Concurrency Limits"=="Použiť limity súbežnosti"
|
||||
"Total maximum number of simultaneously open connections in the pool"=="Celkový maximálny počet súčasne otvorených pripojení v bazéne"
|
||||
"Number of connections currently being used to execute requests."=="Počet pripojení, ktoré sa momentálne používajú na vykonávanie požiadaviek."
|
||||
"Number of reusable idle connections"=="Počet opätovne použiteľných nečinných pripojení"
|
||||
@@ -2604,10 +2607,11 @@ Maximum number of words in cache:==Maximálny počet slov vo vyrovnávacej pamä
|
||||
This is is the number of word indexes that shall be held in the==Toto je pocet indexov slov ktore by mali byt
|
||||
ram cache during indexing. When YaCy is shut down, this cache must be==v RAM cache pocas indexacie. Ak je YaCy vypnute, tato cache musi byt
|
||||
flushed to disc; this may last some minutes.==ulozena na disk. To moze trvat niekolko minut.
|
||||
Thread Pool Settings:==Nastavenia fondu vlákien:
|
||||
Thread Pool==Zásobník závitov
|
||||
maximum Active==max. aktivnych
|
||||
current Active==prave aktivnych
|
||||
Concurrency Limits:==Limity súbežnosti:
|
||||
Workload==Pracovné zaťaženie
|
||||
Incoming HTTP Requests==Prichádzajúce HTTP požiadavky
|
||||
Maximum Active==Maximálne aktívne
|
||||
Currently Active==Aktuálne aktívne
|
||||
Outgoing connections pools settings :==Nastavenia fondov odchádzajúcich pripojení:
|
||||
Connection Pool==Bazén pripojenia
|
||||
Total maximum==Celkové maximum
|
||||
@@ -3373,7 +3377,9 @@ RAM used:==Použitá RAM:
|
||||
RAM max:==RAM max:
|
||||
DISK used:==Použitý DISK:
|
||||
DISK free:==DISK zadarmo:
|
||||
Incoming Connections==Prichadzajuce spojenia
|
||||
Incoming HTTP Requests==Prichádzajúce HTTP požiadavky
|
||||
Active:==Aktívne:
|
||||
Limit:==Limit:
|
||||
Queues==Fronty
|
||||
Local Crawl==Lokalne crawlovat
|
||||
(paused)==(pozastavené)
|
||||
|
||||
@@ -2654,11 +2654,20 @@
|
||||
|
||||
<file original="Connections_p.html" source-language="en" datatype="html">
|
||||
<body>
|
||||
<trans-unit id="da1cdd7c" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Server Connection Tracking</source>
|
||||
<trans-unit id="a23473" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Connection and Request Tracking</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="14f5d45b" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Incoming Connections</source>
|
||||
<trans-unit id="dfe35a22" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Incoming HTTP Requests</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="89681f98" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Active HTTP requests:</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="18ee22d7" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Remote-request limit:</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="de4245bc" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Local requests are exempt.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="c8e4f2b8" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Protocol</source>
|
||||
@@ -7136,8 +7145,8 @@
|
||||
<trans-unit id="25753af9" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>"Enter New Cache Size"</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="9f9296dc" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>"Enter new Threadpool Configuration"</source>
|
||||
<trans-unit id="f80e9589" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>"Apply Concurrency Limits"</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="74791d75" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>"Total maximum number of simultaneously open connections in the pool"</source>
|
||||
@@ -7298,17 +7307,20 @@
|
||||
<trans-unit id="35cca64c" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>flushed to disc; this may last some minutes.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="ca387229" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Thread Pool Settings:</source>
|
||||
<trans-unit id="c99adf55" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Concurrency Limits:</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="d2facc72" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Thread Pool</source>
|
||||
<trans-unit id="5f8ff97" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Workload</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="4aeef926" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>maximum Active</source>
|
||||
<trans-unit id="f35c546" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Maximum Active</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="4f5fabad" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>current Active</source>
|
||||
<trans-unit id="51dc7be0" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Currently Active</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="dfe35a22" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Incoming HTTP Requests</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="82717ee5" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Outgoing connections pools settings :</source>
|
||||
@@ -9427,8 +9439,14 @@
|
||||
<trans-unit id="94e8670b" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>DISK free:</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="14f5d45b" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Incoming Connections</source>
|
||||
<trans-unit id="dfe35a22" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Incoming HTTP Requests</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="1df8f9d4" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Active:</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="87ab17ff" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Limit:</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="90d8f5a2" xml:space="preserve" approved="no" translate="yes">
|
||||
<source>Queues</source>
|
||||
|
||||
+14
-8
@@ -953,8 +953,11 @@ automatic update: add the following line to /etc/crontab<br/>0 6 * * * root apt-
|
||||
|
||||
#File: Connections_p.html
|
||||
#---------------------------
|
||||
Server Connection Tracking==Sunucu Bağlantı Takibi
|
||||
Incoming Connections==Gelen Bağlantılar
|
||||
Connection and Request Tracking==Bağlantı ve İstek Takibi
|
||||
Incoming HTTP Requests==Gelen HTTP İstekleri
|
||||
Active HTTP requests:==Etkin HTTP istekleri:
|
||||
Remote-request limit:==Uzak istek sınırı:
|
||||
Local requests are exempt.==Yerel istekler muaftır.
|
||||
Protocol==Protokol
|
||||
Duration==Süre
|
||||
Source IP[:Port]==Kaynak IP[:Bağlantı Noktası]
|
||||
@@ -2558,7 +2561,7 @@ Search Event Cache==Etkinlik Önbelleğinde Ara
|
||||
"Reverse Word Index"=="Ters Kelime Dizini"
|
||||
"Submit New Values"=="Yeni Değerler Gönder"
|
||||
"Enter New Cache Size"=="Yeni Önbellek Boyutunu Girin"
|
||||
"Enter new Threadpool Configuration"=="Yeni İş Parçacığı Havuzu Yapılandırmasını girin"
|
||||
"Apply Concurrency Limits"=="Eşzamanlılık Sınırlarını Uygula"
|
||||
"Total maximum number of simultaneously open connections in the pool"=="Havuzdaki aynı anda açık bağlantıların toplam maksimum sayısı"
|
||||
"Number of connections currently being used to execute requests."=="Şu anda istekleri yürütmek için kullanılan bağlantı sayısı."
|
||||
"Number of reusable idle connections"=="Yeniden kullanılabilir boş bağlantı sayısı"
|
||||
@@ -2612,10 +2615,11 @@ Maximum number of words in cache:==Önbellekteki maksimum kelime sayısı:
|
||||
This is is the number of word indexes that shall be held in the==Bu, dosyada tutulacak kelime indekslerinin sayısıdır.
|
||||
ram cache during indexing. When YaCy is shut down, this cache must be==İndeksleme sırasında RAM önbelleği. YaCy kapatıldığında bu önbellek
|
||||
flushed to disc; this may last some minutes.==diske boşaltıldı; bu birkaç dakika sürebilir.
|
||||
Thread Pool Settings:==Konu Havuzu Ayarları:
|
||||
Thread Pool==Konu Havuzu
|
||||
maximum Active==maksimum Aktif
|
||||
current Active==mevcut Aktif
|
||||
Concurrency Limits:==Eşzamanlılık Sınırları:
|
||||
Workload==İş Yükü
|
||||
Incoming HTTP Requests==Gelen HTTP İstekleri
|
||||
Maximum Active==Maksimum Etkin
|
||||
Currently Active==Şu Anda Etkin
|
||||
Outgoing connections pools settings :==Giden bağlantı havuzları ayarları:
|
||||
Connection Pool==Bağlantı Havuzu
|
||||
Total maximum==Toplam maksimum
|
||||
@@ -3381,7 +3385,9 @@ RAM used:==Kullanılan RAM:
|
||||
RAM max:==Maksimum RAM:
|
||||
DISK used:==Kullanılan DISK:
|
||||
DISK free:==DISK boş:
|
||||
Incoming Connections==Gelen Bağlantılar
|
||||
Incoming HTTP Requests==Gelen HTTP İstekleri
|
||||
Active:==Etkin:
|
||||
Limit:==Sınır:
|
||||
Queues==Kuyruklar
|
||||
Local Crawl==Yerel Tarama
|
||||
(paused)==(duraklatıldı)
|
||||
|
||||
+14
-8
@@ -688,8 +688,11 @@ manual update:<br/>apt-get update && apt-get install yacy==оновле
|
||||
automatic update: add the following line to /etc/crontab<br/>0 6 * * * root apt-get update && apt-get -y --force-yes install yacy==автоматичне оновлення: додайте наступний рядок до /etc/crontab<br/>0 6 * * * root apt-get update && apt-get -y --force-yes install yacy
|
||||
#File: Connections_p.html
|
||||
#---------------------------
|
||||
Server Connection Tracking==Стан підключень сервера
|
||||
Incoming Connections==Вхідні з’єднання
|
||||
Connection and Request Tracking==Відстеження з’єднань і запитів
|
||||
Incoming HTTP Requests==Вхідні HTTP-запити
|
||||
Active HTTP requests:==Активні HTTP-запити:
|
||||
Remote-request limit:==Ліміт віддалених запитів:
|
||||
Local requests are exempt.==Локальні запити не обмежуються.
|
||||
Duration==Тривалість
|
||||
Source IP[:Port]==IP джерела[:Порт]
|
||||
Dest. IP[:Port]==IP призначення[:Порт]
|
||||
@@ -1919,9 +1922,9 @@ Maximum number of words in cache:==Максимальна кількість с
|
||||
This is is the number of word indexes that shall be held in the==Це кількість слів в індексах, що під час індексації
|
||||
ram cache during indexing. When YaCy is shut down, this cache must be==RAM кешу повинні бути збережені. Під час вимкнення YaCy, цей кеш повинен
|
||||
flushed to disc; this may last some minutes.==бути збережений на диск, що може зайняти декілька хвилин.
|
||||
Thread Pool Settings:==Установки пулу потоків:
|
||||
maximum Active==макс. активний
|
||||
current Active==поточний активний
|
||||
Concurrency Limits:==Обмеження паралельності:
|
||||
Maximum Active==Максимум активних
|
||||
Currently Active==Активні зараз
|
||||
milliseconds==мілісекунд
|
||||
|
||||
#Сурогати->Заміщення
|
||||
@@ -1933,7 +1936,7 @@ milliseconds==мілісекунд
|
||||
"Reverse Word Index"=="Зворотний покажчик слів"
|
||||
"Submit New Values"=="Надіслати нові значення"
|
||||
"Enter New Cache Size"=="Введіть новий розмір кешу"
|
||||
"Enter new Threadpool Configuration"=="Введіть нову конфігурацію Threadpool"
|
||||
"Apply Concurrency Limits"=="Застосувати обмеження паралельності"
|
||||
"Total maximum number of simultaneously open connections in the pool"=="Загальна максимальна кількість одночасно відкритих підключень у пулі"
|
||||
"Number of connections currently being used to execute requests."=="Кількість підключень, які зараз використовуються для виконання запитів."
|
||||
"Number of reusable idle connections"=="Кількість багаторазових неактивних підключень"
|
||||
@@ -1954,7 +1957,8 @@ Search requests performed on remote peers distributed Reverse Word Index==Зап
|
||||
Solr==Solr
|
||||
Search requests performed on remote peers Solr indexes==Пошукові запити виконуються на віддалених однорангових індексах Solr
|
||||
Words in RAM cache:<br />(Size in KBytes)==Слова в кеші RAM:<br />(Розмір у кбайтах)
|
||||
Thread Pool==Пул потоків
|
||||
Workload==Робоче навантаження
|
||||
Incoming HTTP Requests==Вхідні HTTP-запити
|
||||
Outgoing connections pools settings :==Параметри пулів вихідних з'єднань:
|
||||
Connection Pool==Пул підключень
|
||||
Total maximum==Загальний максимум
|
||||
@@ -2430,7 +2434,9 @@ No==Ні
|
||||
Auto-popup on start-up==Самопоказ при запуску
|
||||
Memory Usage==Споживання пам’яті
|
||||
|
||||
Incoming Connections==Вхідні з’єднання
|
||||
Incoming HTTP Requests==Вхідні HTTP-запити
|
||||
Active:==Активні:
|
||||
Limit:==Ліміт:
|
||||
Max:Макс.:
|
||||
Local Crawl==Місцеве сканування
|
||||
Remote triggered Crawl==Вхідні віддалені сканування
|
||||
|
||||
+14
-8
@@ -946,8 +946,11 @@ automatic update: add the following line to /etc/crontab<br/>0 6 * * * root apt-
|
||||
|
||||
#File: Connections_p.html
|
||||
#---------------------------
|
||||
Server Connection Tracking==服务器连接跟踪
|
||||
Incoming Connections==进入连接
|
||||
Connection and Request Tracking==连接和请求跟踪
|
||||
Incoming HTTP Requests==传入 HTTP 请求
|
||||
Active HTTP requests:==活动 HTTP 请求:
|
||||
Remote-request limit:==远程请求限制:
|
||||
Local requests are exempt.==本地请求不受此限制。
|
||||
Protocol==协议
|
||||
Duration==持续时间
|
||||
Source IP[:Port]==来源IP[:端口]
|
||||
@@ -2551,7 +2554,7 @@ Search Event Cache==搜索事件缓存
|
||||
"Reverse Word Index"=="反向词索引"
|
||||
"Submit New Values"=="提交新值"
|
||||
"Enter New Cache Size"=="输入新的缓存大小"
|
||||
"Enter new Threadpool Configuration"=="输入新的线程池配置"
|
||||
"Apply Concurrency Limits"=="应用并发限制"
|
||||
"Total maximum number of simultaneously open connections in the pool"=="池中同时打开的连接的最大总数"
|
||||
"Number of connections currently being used to execute requests."=="当前用于执行请求的连接数。"
|
||||
"Number of reusable idle connections"=="可重用的空闲连接数"
|
||||
@@ -2605,10 +2608,11 @@ Maximum number of words in cache:==缓存中关键字最大数目:
|
||||
This is is the number of word indexes that shall be held in the==这是索引时缓存中存在的最大关键字索引数目.
|
||||
ram cache during indexing. When YaCy is shut down, this cache must be==当YaCy停止时,
|
||||
flushed to disc; this may last some minutes.==它们会被冲刷到硬盘中, 可能会花费数分钟.
|
||||
Thread Pool Settings:==线程池设置:
|
||||
Thread Pool==线程池
|
||||
maximum Active==最大活动
|
||||
current Active==当前活动
|
||||
Concurrency Limits:==并发限制:
|
||||
Workload==工作负载
|
||||
Incoming HTTP Requests==传入 HTTP 请求
|
||||
Maximum Active==最大活动数
|
||||
Currently Active==当前活动数
|
||||
Outgoing connections pools settings :==传出连接池设置:
|
||||
Connection Pool==连接池
|
||||
Total maximum==总最大值
|
||||
@@ -3374,7 +3378,9 @@ RAM used:==占用内存:
|
||||
RAM max:==最大内存:
|
||||
DISK used:==占用硬盘:
|
||||
DISK free:==可用硬盘:
|
||||
Incoming Connections==流入连接
|
||||
Incoming HTTP Requests==传入 HTTP 请求
|
||||
Active:==活动:
|
||||
Limit:==限制:
|
||||
Queues==队列
|
||||
Local Crawl==本地爬取
|
||||
(paused)==(停顿)
|
||||
|
||||
@@ -44,16 +44,17 @@ public class ConnectionInfo implements Comparable<ConnectionInfo> {
|
||||
.synchronizedSet(new HashSet<ConnectionInfo>());
|
||||
private final static Set<ConnectionInfo> serverConnections = Collections
|
||||
.synchronizedSet(new HashSet<ConnectionInfo>());
|
||||
// this is only for statistics, so it can be bigger to see lost connectionInfos
|
||||
private final static int staleAfterMillis = 30 * 60000; // 30 minutes
|
||||
/* Stale cleanup is a safety net; normal request and client lifecycles remove their own entries. */
|
||||
private static final long CLIENT_STALE_AFTER_MILLIS = 30L * 60L * 1000L;
|
||||
private static final long SERVER_STALE_AFTER_MILLIS = 30L * 60L * 1000L;
|
||||
|
||||
private static int maxcount = 20;
|
||||
private static int serverMaxCount = 50;
|
||||
private static volatile int serverMaxCount = 50;
|
||||
|
||||
private final String protocol;
|
||||
private final String targetHost;
|
||||
private final String command;
|
||||
private final int id;
|
||||
private final long id;
|
||||
private final long initTime;
|
||||
private final long upbytes;
|
||||
|
||||
@@ -66,7 +67,7 @@ public class ConnectionInfo implements Comparable<ConnectionInfo> {
|
||||
* @param id
|
||||
* @param initTime
|
||||
*/
|
||||
public ConnectionInfo(final String protocol, final String targetHost, final String command, final int id,
|
||||
public ConnectionInfo(final String protocol, final String targetHost, final String command, final long id,
|
||||
final long initTime, final long upbytes) {
|
||||
this.protocol = protocol;
|
||||
this.targetHost = targetHost;
|
||||
@@ -114,7 +115,7 @@ public class ConnectionInfo implements Comparable<ConnectionInfo> {
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
public int getID() {
|
||||
public long getID() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -150,7 +151,7 @@ public class ConnectionInfo implements Comparable<ConnectionInfo> {
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the number of active server connections
|
||||
* gets the number of active incoming server requests
|
||||
*
|
||||
* @return count of active connections
|
||||
*/
|
||||
@@ -168,7 +169,7 @@ public class ConnectionInfo implements Comparable<ConnectionInfo> {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return wether the server max connection-count is reached
|
||||
* @return whether the incoming server request limit is reached
|
||||
*/
|
||||
public static boolean isServerCountReached() {
|
||||
return getServerCount() >= getServerMaxcount();
|
||||
@@ -210,7 +211,7 @@ public class ConnectionInfo implements Comparable<ConnectionInfo> {
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the max connection count of the Server connection manager
|
||||
* gets the maximum active incoming server request count
|
||||
*
|
||||
* @return max connections
|
||||
*/
|
||||
@@ -219,14 +220,17 @@ public class ConnectionInfo implements Comparable<ConnectionInfo> {
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the max connection count of the Sever connection manager
|
||||
* to be used in statistics
|
||||
* sets the maximum active incoming server request count
|
||||
*
|
||||
* @param max connections
|
||||
* @TODO Is it correct to only set if max > 0? What if maxcount is > 0 and max = 0 ?
|
||||
*/
|
||||
public static void setServerMaxcount(final int max) {
|
||||
if (max > 0) serverMaxCount = max;
|
||||
if (max > 0) {
|
||||
synchronized (serverConnections) {
|
||||
serverMaxCount = max;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -239,12 +243,30 @@ public class ConnectionInfo implements Comparable<ConnectionInfo> {
|
||||
}
|
||||
|
||||
/**
|
||||
* add a Server connection to the list of all current connections
|
||||
* add an incoming server request to the active request list
|
||||
*
|
||||
* @param conInfo
|
||||
*/
|
||||
public static void addServerConnection(final ConnectionInfo conInfo) {
|
||||
getServerConnections().add(conInfo);
|
||||
getServerConnections().add(conInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an incoming server request when capacity is available. The capacity check
|
||||
* and insertion are performed while holding the same lock, so concurrent
|
||||
* callers cannot exceed the configured limit.
|
||||
*
|
||||
* @param conInfo the connection to track
|
||||
* @param limitExempt when true, add the connection regardless of the limit
|
||||
* @return true when the connection was added, false when it was rejected
|
||||
*/
|
||||
public static boolean tryAddServerConnection(final ConnectionInfo conInfo, final boolean limitExempt) {
|
||||
synchronized (serverConnections) {
|
||||
if (!limitExempt && serverConnections.size() >= serverMaxCount) {
|
||||
return false;
|
||||
}
|
||||
return serverConnections.add(conInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -257,7 +279,7 @@ public class ConnectionInfo implements Comparable<ConnectionInfo> {
|
||||
}
|
||||
|
||||
/**
|
||||
* remove a Server connection from the list of all current connections
|
||||
* remove an incoming server request from the active request list
|
||||
*
|
||||
* @param conInfo
|
||||
*/
|
||||
@@ -270,42 +292,50 @@ public class ConnectionInfo implements Comparable<ConnectionInfo> {
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public static void removeConnection(final int id) {
|
||||
public static void removeConnection(final long id) {
|
||||
removeConnection(new ConnectionInfo(null, null, null, id, 0, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* connections with same id {@link equals()} another
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public static void removeServerConnection(final int id) {
|
||||
removeServerConnection(new ConnectionInfo(null, null, null, id, 0, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* removes stale connections
|
||||
* Remove stale client and server entries. Prefer the pool-specific cleanup
|
||||
* methods when the caller treats the two pools independently.
|
||||
*/
|
||||
public static void cleanUp() {
|
||||
cleanup(getAllConnections());
|
||||
cleanup(getServerConnections());
|
||||
cleanUpClientConnections();
|
||||
cleanUpServerConnections();
|
||||
}
|
||||
|
||||
private static void cleanup(final Set<ConnectionInfo> connectionSet) {
|
||||
final Iterator<ConnectionInfo> iter = connectionSet.iterator();
|
||||
synchronized (iter) {
|
||||
|
||||
/**
|
||||
* Remove client connection entries that outlived the stale threshold.
|
||||
*
|
||||
* @return the number of removed entries
|
||||
*/
|
||||
public static int cleanUpClientConnections() {
|
||||
return cleanup(allConnections, CLIENT_STALE_AFTER_MILLIS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove incoming request entries that outlived the stale threshold.
|
||||
*
|
||||
* @return the number of removed entries
|
||||
*/
|
||||
public static int cleanUpServerConnections() {
|
||||
return cleanup(serverConnections, SERVER_STALE_AFTER_MILLIS);
|
||||
}
|
||||
|
||||
private static int cleanup(final Set<ConnectionInfo> connectionSet, final long staleAfterMillis) {
|
||||
int removed = 0;
|
||||
synchronized (connectionSet) {
|
||||
final Iterator<ConnectionInfo> iter = connectionSet.iterator();
|
||||
while (iter.hasNext()) {
|
||||
ConnectionInfo con = null;
|
||||
try {
|
||||
con = iter.next();
|
||||
} catch (Throwable e) {break;} // this must break because otherwise there is danger that the loop does never terminates
|
||||
try {
|
||||
if (con.getLifetime() > staleAfterMillis) {
|
||||
connectionSet.remove(con);
|
||||
}
|
||||
} catch (Throwable e) {continue;}
|
||||
final ConnectionInfo con = iter.next();
|
||||
if (con.getLifetime() > staleAfterMillis) {
|
||||
iter.remove();
|
||||
removed++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return removed;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
@@ -335,10 +365,7 @@ public class ConnectionInfo implements Comparable<ConnectionInfo> {
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + id;
|
||||
return result;
|
||||
return Long.hashCode(this.id);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -44,7 +44,7 @@ public final class Connections_p {
|
||||
// return variable that accumulates replacements
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
// server sessions
|
||||
// active incoming HTTP requests
|
||||
List<ConnectionInfo> allConnectionsSorted = new LinkedList<ConnectionInfo>(ConnectionInfo.getServerConnections());
|
||||
Collections.sort(allConnectionsSorted);
|
||||
Collections.reverse(allConnectionsSorted); // toggle ascending/descending
|
||||
@@ -64,7 +64,7 @@ public final class Connections_p {
|
||||
prop.putNum("numMax", ConnectionInfo.getServerMaxcount());
|
||||
prop.putNum("numActiveRunning", c);
|
||||
|
||||
// client sessions
|
||||
// active outgoing client connections
|
||||
// sorting: sort by initTime, decending
|
||||
allConnectionsSorted = new LinkedList<ConnectionInfo>(ConnectionInfo.getAllConnections());
|
||||
Collections.sort(allConnectionsSorted);
|
||||
|
||||
@@ -52,6 +52,12 @@ import net.yacy.server.serverSwitch;
|
||||
|
||||
public class PerformanceQueues_p {
|
||||
|
||||
static final String INCOMING_HTTP_REQUESTS_POOL_NAME = "Incoming HTTP Requests";
|
||||
static final String INCOMING_HTTP_REQUESTS_MAX_ACTIVE_PARAM =
|
||||
INCOMING_HTTP_REQUESTS_POOL_NAME + "_maxActive";
|
||||
static final String LEGACY_HTTPD_SESSION_POOL_MAX_ACTIVE_PARAM =
|
||||
"httpd Session Pool_maxActive";
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
@@ -302,18 +308,9 @@ public class PerformanceQueues_p {
|
||||
sb.setConfig(SwitchboardConstants.ROBOTS_TXT_THREADS_ACTIVE_MAX, maxBusy);
|
||||
|
||||
/*
|
||||
* configuring the http pool
|
||||
* configuring the incoming HTTP request limit
|
||||
*/
|
||||
try {
|
||||
maxBusy = post.getInt("httpd Session Pool_maxActive", 8);
|
||||
} catch (final NumberFormatException e) {
|
||||
maxBusy = 8;
|
||||
}
|
||||
|
||||
ConnectionInfo.setServerMaxcount(maxBusy);
|
||||
|
||||
// storing the new values into configfile
|
||||
sb.setConfig("httpdMaxBusySessions",maxBusy);
|
||||
applyServerMaxcount(sb, postedServerMaxcount(post));
|
||||
|
||||
}
|
||||
|
||||
@@ -357,16 +354,19 @@ public class PerformanceQueues_p {
|
||||
prop.putNum("crawlPauseLocalsearchCurrent", (System.currentTimeMillis() - sb.localSearchLastAccess) / 1000);
|
||||
prop.putNum("crawlPauseRemotesearchCurrent", (System.currentTimeMillis() - sb.remoteSearchLastAccess) / 1000);
|
||||
|
||||
// table thread pool settings
|
||||
// concurrency limits
|
||||
prop.put("pool_0_name","Crawler Pool");
|
||||
prop.put("pool_0_incomingRequests", 0);
|
||||
prop.put("pool_0_maxActive", sb.getConfigLong(SwitchboardConstants.CRAWLER_THREADS_ACTIVE_MAX, 0));
|
||||
prop.put("pool_0_numActive", sb.crawlQueues.activeWorkerEntries().size());
|
||||
|
||||
prop.put("pool_1_name","Robots.txt Pool");
|
||||
prop.put("pool_1_incomingRequests", 0);
|
||||
prop.put("pool_1_maxActive", sb.getConfigInt(SwitchboardConstants.ROBOTS_TXT_THREADS_ACTIVE_MAX, SwitchboardConstants.ROBOTS_TXT_THREADS_ACTIVE_MAX_DEFAULT));
|
||||
prop.put("pool_1_numActive", sb.crawlQueues.activeWorkerEntries().size());
|
||||
|
||||
prop.put("pool_2_name", "httpd Session Pool");
|
||||
prop.put("pool_2_name", INCOMING_HTTP_REQUESTS_POOL_NAME);
|
||||
prop.put("pool_2_incomingRequests", 1);
|
||||
prop.put("pool_2_maxActive", ConnectionInfo.getServerMaxcount());
|
||||
prop.put("pool_2_numActive", ConnectionInfo.getServerCount());
|
||||
|
||||
@@ -420,6 +420,28 @@ public class PerformanceQueues_p {
|
||||
return prop;
|
||||
}
|
||||
|
||||
/** Apply and persist an incoming request limit only when it is valid. */
|
||||
static boolean applyServerMaxcount(final serverSwitch env, final int maxBusy) {
|
||||
if (maxBusy <= 0) {
|
||||
return false;
|
||||
}
|
||||
ConnectionInfo.setServerMaxcount(maxBusy);
|
||||
env.setConfig(SwitchboardConstants.SERVER_MAX_BUSY_SESSIONS, maxBusy);
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Read the corrected form parameter, with the former session-pool name as an alias. */
|
||||
static int postedServerMaxcount(final serverObjects post) {
|
||||
final String parameter = post.containsKey(INCOMING_HTTP_REQUESTS_MAX_ACTIVE_PARAM)
|
||||
? INCOMING_HTTP_REQUESTS_MAX_ACTIVE_PARAM
|
||||
: LEGACY_HTTPD_SESSION_POOL_MAX_ACTIVE_PARAM;
|
||||
try {
|
||||
return post.getInt(parameter, ConnectionInfo.getServerMaxcount());
|
||||
} catch (final NumberFormatException e) {
|
||||
return ConnectionInfo.getServerMaxcount();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a JVM maximum heap size option like "Xmx600m", "Xmx16g" or "Xmx2048k"
|
||||
* into mebibytes for display and editing on the Performance page. The value may
|
||||
|
||||
@@ -23,7 +23,6 @@ package net.yacy.http;
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.nio.channels.ClosedChannelException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
@@ -47,7 +46,6 @@ import org.eclipse.jetty.ee8.servlet.ServletHolder;
|
||||
import org.eclipse.jetty.ee8.webapp.WebAppContext;
|
||||
import org.eclipse.jetty.http.HttpMethod;
|
||||
import org.eclipse.jetty.http.HttpVersion;
|
||||
import org.eclipse.jetty.io.Connection;
|
||||
import org.eclipse.jetty.io.EofException;
|
||||
import org.eclipse.jetty.security.HashLoginService;
|
||||
import org.eclipse.jetty.security.UserPrincipal;
|
||||
@@ -70,7 +68,6 @@ import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
|
||||
import com.google.common.net.InetAddresses;
|
||||
|
||||
import net.yacy.cora.protocol.ConnectionInfo;
|
||||
import net.yacy.cora.protocol.RequestHeader;
|
||||
import net.yacy.cora.util.ConcurrentLog;
|
||||
import net.yacy.http.servlets.MonitorFilter;
|
||||
@@ -123,24 +120,12 @@ public class Jetty12HttpServer implements YaCyHttpServer {
|
||||
private static Server createServer(final int port, final String host, final int acceptorCount,
|
||||
final SSLContext sslContext, final int sslPort) {
|
||||
final Server server = new Server();
|
||||
final Connection.Listener connectionCloseMonitor = new Connection.Listener() {
|
||||
@Override
|
||||
public void onClosed(final Connection connection) {
|
||||
if (connection.getEndPoint().getRemoteSocketAddress() instanceof InetSocketAddress) {
|
||||
final InetSocketAddress remote =
|
||||
(InetSocketAddress) connection.getEndPoint().getRemoteSocketAddress();
|
||||
ConnectionInfo.removeServerConnection(MonitorFilter.connectionId(
|
||||
remote.getAddress().getHostAddress(), remote.getPort()));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
final HttpConfiguration httpConfiguration = new HttpConfiguration();
|
||||
httpConfiguration.setRequestHeaderSize(HttpServerBootstrapConfig.REQUEST_HEADER_SIZE);
|
||||
final ServerConnector httpConnector = new ServerConnector(server, acceptorCount, -1,
|
||||
new HttpConnectionFactory(httpConfiguration));
|
||||
configureConnector(httpConnector, host, port, "httpd-" + host + ":" + port,
|
||||
connectionCloseMonitor);
|
||||
configureConnector(httpConnector, host, port, "httpd-" + host + ":" + port);
|
||||
httpConnector.setAcceptQueueSize(HttpServerBootstrapConfig.ACCEPT_QUEUE_SIZE);
|
||||
server.addConnector(httpConnector);
|
||||
|
||||
@@ -152,8 +137,7 @@ public class Jetty12HttpServer implements YaCyHttpServer {
|
||||
final ServerConnector httpsConnector = new ServerConnector(server, acceptorCount, -1,
|
||||
new SslConnectionFactory(sslContextFactory, HttpVersion.HTTP_1_1.asString()),
|
||||
new HttpConnectionFactory(httpsConfiguration));
|
||||
configureConnector(httpsConnector, host, sslPort, "ssld:" + sslPort,
|
||||
connectionCloseMonitor);
|
||||
configureConnector(httpsConnector, host, sslPort, "ssld:" + sslPort);
|
||||
httpsConnector.setAcceptQueueSize(HttpServerBootstrapConfig.ACCEPT_QUEUE_SIZE);
|
||||
server.addConnector(httpsConnector);
|
||||
}
|
||||
@@ -169,12 +153,11 @@ public class Jetty12HttpServer implements YaCyHttpServer {
|
||||
}
|
||||
|
||||
private static void configureConnector(final ServerConnector connector, final String host,
|
||||
final int port, final String name, final Connection.Listener listener) {
|
||||
final int port, final String name) {
|
||||
connector.setHost(host);
|
||||
connector.setPort(port);
|
||||
connector.setName(name);
|
||||
connector.setIdleTimeout(HttpServerBootstrapConfig.CONNECTOR_IDLE_TIMEOUT_MILLIS);
|
||||
connector.addBean(listener);
|
||||
}
|
||||
|
||||
private static Handler createWebAppHandler(final Server server,
|
||||
|
||||
@@ -25,7 +25,11 @@
|
||||
package net.yacy.http.servlets;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import javax.servlet.AsyncEvent;
|
||||
import javax.servlet.AsyncListener;
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
@@ -42,14 +46,17 @@ import net.yacy.cora.protocol.RequestHeader;
|
||||
/**
|
||||
* Records incoming server requests into {@link ConnectionInfo} (displayed on
|
||||
* Connections_p.html) and rejects remote requests with http status 503 when
|
||||
* the configured maximum number of server connections is reached.
|
||||
* the configured maximum number of active incoming requests is reached.
|
||||
*
|
||||
* This is a plain servlet filter (former Jetty handler MonitorHandler); the
|
||||
* tracking entry of a connection is removed on connection close by a
|
||||
* servlet-container specific listener, see Jetty12HttpServer.
|
||||
* This is a plain servlet filter (former Jetty handler MonitorHandler). A
|
||||
* synchronous request is removed when its filter chain exits; an asynchronous
|
||||
* request is removed by a listener when its asynchronous lifecycle finishes.
|
||||
*/
|
||||
public class MonitorFilter implements Filter {
|
||||
|
||||
/** Supplies a distinct tracking identity for every incoming request. */
|
||||
private static final AtomicLong NEXT_REQUEST_ID = new AtomicLong();
|
||||
|
||||
@Override
|
||||
public void init(FilterConfig filterConfig) throws ServletException {
|
||||
}
|
||||
@@ -58,18 +65,6 @@ public class MonitorFilter implements Filter {
|
||||
public void destroy() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ConnectionInfo id of the tcp connection identified by client address and port
|
||||
*/
|
||||
public static int connectionId(String remoteAddr, final int remotePort) {
|
||||
// the servlet API reports IPv6 addresses in bracketed form ("[::1]"), the
|
||||
// connection endpoint in plain form: normalize to the plain form
|
||||
if (remoteAddr.startsWith("[") && remoteAddr.endsWith("]")) {
|
||||
remoteAddr = remoteAddr.substring(1, remoteAddr.length() - 1);
|
||||
}
|
||||
return (remoteAddr + ":" + remotePort).hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
|
||||
throws IOException, ServletException {
|
||||
@@ -80,20 +75,56 @@ public class MonitorFilter implements Filter {
|
||||
hrequest.getScheme(),
|
||||
RequestHeader.client(hrequest) + ":" + hrequest.getRemotePort(),
|
||||
hrequest.getMethod() + " " + hrequest.getRequestURI() + (query == null ? "" : "?" + query),
|
||||
connectionId(hrequest.getRemoteAddr(), hrequest.getRemotePort()),
|
||||
NEXT_REQUEST_ID.getAndIncrement(),
|
||||
System.currentTimeMillis(),
|
||||
-1);
|
||||
|
||||
// a keep-alive connection reuses the id: remove a previous entry to show the latest request
|
||||
ConnectionInfo.removeServerConnection(info);
|
||||
ConnectionInfo.addServerConnection(info);
|
||||
|
||||
if (ConnectionInfo.isServerCountReached()
|
||||
&& !Domains.isLocal(hrequest.getRemoteAddr(), null)) {
|
||||
final boolean limitExempt = Domains.isLocal(hrequest.getRemoteAddr(), null);
|
||||
if (!ConnectionInfo.tryAddServerConnection(info, limitExempt)) {
|
||||
((HttpServletResponse) response).sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE,
|
||||
"max. server connections reached (increase /PerformanceQueues_p.html -> httpd Session Pool).");
|
||||
"maximum active HTTP requests reached (increase Incoming HTTP Requests on "
|
||||
+ "/PerformanceQueues_p.html).");
|
||||
return;
|
||||
}
|
||||
chain.doFilter(request, response);
|
||||
|
||||
final AtomicBoolean removed = new AtomicBoolean();
|
||||
final Runnable removeTracking = () -> {
|
||||
if (removed.compareAndSet(false, true)) {
|
||||
ConnectionInfo.removeServerConnection(info);
|
||||
}
|
||||
};
|
||||
boolean asyncCleanupRegistered = false;
|
||||
try {
|
||||
chain.doFilter(request, response);
|
||||
|
||||
if (hrequest.isAsyncStarted()) {
|
||||
hrequest.getAsyncContext().addListener(new AsyncListener() {
|
||||
@Override
|
||||
public void onComplete(final AsyncEvent event) {
|
||||
removeTracking.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTimeout(final AsyncEvent event) {
|
||||
removeTracking.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(final AsyncEvent event) {
|
||||
removeTracking.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartAsync(final AsyncEvent event) {
|
||||
event.getAsyncContext().addListener(this);
|
||||
}
|
||||
});
|
||||
asyncCleanupRegistered = true;
|
||||
}
|
||||
} finally {
|
||||
if (!asyncCleanupRegistered) {
|
||||
removeTracking.run();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2547,8 +2547,9 @@ public final class Switchboard extends serverSwitch {
|
||||
ConcurrentLog.logException(e);
|
||||
}
|
||||
|
||||
// close unused connections
|
||||
ConnectionInfo.cleanUp();
|
||||
// Safety-net cleanup for entries missed by their normal lifecycle handling.
|
||||
ConnectionInfo.cleanUpClientConnections();
|
||||
ConnectionInfo.cleanUpServerConnections();
|
||||
|
||||
// clean up delegated stack
|
||||
this.checkInterruption();
|
||||
|
||||
@@ -66,6 +66,9 @@ public final class SwitchboardConstants {
|
||||
public static final String SERVER_SHUTDOWNPORT = "port.shutdown"; // local port to listen for a shutdown signal (0 <= disabled)
|
||||
public static final String SERVER_STATICIP = "staticIP"; // static IP of http server
|
||||
public static final String SERVER_PUBLICPORT = "publicPort";
|
||||
/** Maximum number of concurrently tracked incoming HTTP requests. */
|
||||
public static final String SERVER_MAX_BUSY_SESSIONS = "httpdMaxBusySessions";
|
||||
public static final int SERVER_MAX_BUSY_SESSIONS_DEFAULT = 200;
|
||||
/** Socket peers whose validated X-Real-IP header may be used for routing and tracking. */
|
||||
public static final String SERVER_REVERSE_PROXY_TRUSTED = "server.reverseProxy.trusted";
|
||||
public static final String SERVER_REVERSE_PROXY_TRUSTED_DEFAULT =
|
||||
|
||||
@@ -298,15 +298,16 @@ public final class yacy {
|
||||
final String host = sb.getLocalHost();
|
||||
ScheduledExecutorService logReportScheduler = null;
|
||||
try {
|
||||
// start http server
|
||||
YaCyHttpServer httpServer;
|
||||
httpServer = new Jetty12HttpServer(port, host);
|
||||
httpServer.startupServer();
|
||||
sb.setHttpServer(httpServer);
|
||||
// TODO: this has no effect on Jetty (but needed to reflect configured value and limit is still used)
|
||||
ConnectionInfo.setServerMaxcount(sb.getConfigInt("connectionsMax", ConnectionInfo.getMaxcount()));
|
||||
|
||||
ConcurrentLog.info("STARTUP",httpServer.getVersion());
|
||||
// start http server
|
||||
YaCyHttpServer httpServer;
|
||||
ConnectionInfo.setServerMaxcount(sb.getConfigInt(
|
||||
SwitchboardConstants.SERVER_MAX_BUSY_SESSIONS,
|
||||
SwitchboardConstants.SERVER_MAX_BUSY_SESSIONS_DEFAULT));
|
||||
httpServer = new Jetty12HttpServer(port, host);
|
||||
httpServer.startupServer();
|
||||
sb.setHttpServer(httpServer);
|
||||
|
||||
ConcurrentLog.info("STARTUP",httpServer.getVersion());
|
||||
|
||||
// open the browser window
|
||||
final boolean browserPopUpTrigger = sb.getConfig(SwitchboardConstants.BROWSER_POP_UP_TRIGGER, "true").equals("true");
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package net.yacy.htroot;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
|
||||
import net.yacy.cora.protocol.ConnectionInfo;
|
||||
import net.yacy.search.SwitchboardConstants;
|
||||
import net.yacy.server.serverObjects;
|
||||
import net.yacy.server.serverSwitch;
|
||||
|
||||
/** Focused tests for persisted Performance Queues settings. */
|
||||
public class PerformanceQueues_pTest {
|
||||
|
||||
@Rule
|
||||
public final TemporaryFolder temporaryFolder = new TemporaryFolder();
|
||||
|
||||
@Test
|
||||
public void incomingRequestMaximumPersistsUnderStartupConfigurationKey() throws Exception {
|
||||
final int previousMaximum = ConnectionInfo.getServerMaxcount();
|
||||
final File root = this.temporaryFolder.newFolder("peer");
|
||||
try {
|
||||
final serverSwitch firstRun = config(root);
|
||||
assertTrue(PerformanceQueues_p.applyServerMaxcount(firstRun, 73));
|
||||
assertEquals(73, ConnectionInfo.getServerMaxcount());
|
||||
|
||||
final serverSwitch restarted = config(root);
|
||||
assertEquals(73, restarted.getConfigInt(
|
||||
SwitchboardConstants.SERVER_MAX_BUSY_SESSIONS, -1));
|
||||
|
||||
assertFalse(PerformanceQueues_p.applyServerMaxcount(restarted, 0));
|
||||
assertEquals("An invalid update must preserve the saved value", 73,
|
||||
restarted.getConfigInt(SwitchboardConstants.SERVER_MAX_BUSY_SESSIONS, -1));
|
||||
assertEquals("An invalid update must preserve the active value", 73,
|
||||
ConnectionInfo.getServerMaxcount());
|
||||
} finally {
|
||||
ConnectionInfo.setServerMaxcount(previousMaximum);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void correctedRequestParameterTakesPrecedenceAndLegacyNameRemainsAccepted() {
|
||||
final serverObjects legacyPost = new serverObjects();
|
||||
legacyPost.put(PerformanceQueues_p.LEGACY_HTTPD_SESSION_POOL_MAX_ACTIVE_PARAM, "71");
|
||||
assertEquals(71, PerformanceQueues_p.postedServerMaxcount(legacyPost));
|
||||
|
||||
final serverObjects correctedPost = new serverObjects();
|
||||
correctedPost.put(PerformanceQueues_p.LEGACY_HTTPD_SESSION_POOL_MAX_ACTIVE_PARAM, "71");
|
||||
correctedPost.put(PerformanceQueues_p.INCOMING_HTTP_REQUESTS_MAX_ACTIVE_PARAM, "72");
|
||||
assertEquals(72, PerformanceQueues_p.postedServerMaxcount(correctedPost));
|
||||
}
|
||||
|
||||
private static serverSwitch config(final File root) {
|
||||
return new serverSwitch(root, root, "missing.init", "settings/yacy.conf");
|
||||
}
|
||||
}
|
||||
@@ -11,25 +11,35 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.net.Socket;
|
||||
import java.net.SocketException;
|
||||
import java.nio.channels.ClosedChannelException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.servlet.DispatcherType;
|
||||
import javax.servlet.AsyncContext;
|
||||
import javax.servlet.AsyncListener;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.eclipse.jetty.ee8.security.authentication.DigestAuthenticator;
|
||||
import org.eclipse.jetty.ee8.servlet.FilterHolder;
|
||||
import org.eclipse.jetty.ee8.servlet.ServletContextHandler;
|
||||
import org.eclipse.jetty.ee8.servlet.ServletHolder;
|
||||
import org.eclipse.jetty.io.EofException;
|
||||
@@ -44,12 +54,16 @@ import org.eclipse.jetty.server.handler.gzip.GzipHandler;
|
||||
import org.eclipse.jetty.server.handler.InetAccessHandler;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.security.Credential;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.runners.Enclosed;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import net.yacy.cora.order.Digest;
|
||||
import net.yacy.cora.protocol.ConnectionInfo;
|
||||
import net.yacy.cora.protocol.RequestHeader;
|
||||
import net.yacy.http.servlets.MonitorFilter;
|
||||
import net.yacy.search.SwitchboardConstants;
|
||||
|
||||
/**
|
||||
@@ -279,6 +293,375 @@ public class Jetty12HttpServerTest {
|
||||
}
|
||||
}
|
||||
|
||||
/** Regression coverage for the incoming-request accounting leak reported in #800 and #808. */
|
||||
public static class ConnectionTrackingTest {
|
||||
|
||||
private int previousServerMaxCount;
|
||||
|
||||
@Before
|
||||
public void resetConnectionTracking() {
|
||||
this.previousServerMaxCount = ConnectionInfo.getServerMaxcount();
|
||||
ConnectionInfo.getServerConnections().clear();
|
||||
ConnectionInfo.setServerMaxcount(100);
|
||||
}
|
||||
|
||||
@After
|
||||
public void restoreConnectionTracking() {
|
||||
ConnectionInfo.getServerConnections().clear();
|
||||
ConnectionInfo.setServerMaxcount(this.previousServerMaxCount);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void releasesTrackingAfterRepeatedSynchronousRequests() throws Exception {
|
||||
final Jetty12HttpServer httpServer = trackedHttpServer();
|
||||
try {
|
||||
httpServer.startupServer();
|
||||
for (int request = 0; request < 3; request++) {
|
||||
final String response = closeRequest(httpServer.getHttpPort(), "/request-" + request);
|
||||
assertTrue(response, response.startsWith("HTTP/1.1 204"));
|
||||
assertTrackingReturnsToZero();
|
||||
}
|
||||
} finally {
|
||||
httpServer.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void releasesTrackingWhileKeepAliveConnectionRemainsOpen() throws Exception {
|
||||
final Jetty12HttpServer httpServer = trackedHttpServer();
|
||||
try {
|
||||
httpServer.startupServer();
|
||||
try (Socket client = new Socket("127.0.0.1", httpServer.getHttpPort())) {
|
||||
final OutputStream output = client.getOutputStream();
|
||||
output.write(("GET /first HTTP/1.1\r\nHost: 127.0.0.1\r\n"
|
||||
+ "Connection: keep-alive\r\n\r\n").getBytes(StandardCharsets.US_ASCII));
|
||||
output.flush();
|
||||
assertTrue(readHeaders(client.getInputStream()).startsWith("HTTP/1.1 204"));
|
||||
assertTrackingReturnsToZero();
|
||||
|
||||
output.write(("GET /second HTTP/1.1\r\nHost: 127.0.0.1\r\n"
|
||||
+ "Connection: close\r\n\r\n").getBytes(StandardCharsets.US_ASCII));
|
||||
output.flush();
|
||||
assertTrue(readAll(client.getInputStream()).startsWith("HTTP/1.1 204"));
|
||||
}
|
||||
assertTrackingReturnsToZero();
|
||||
} finally {
|
||||
httpServer.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void releasesTrackingWhenFilterChainThrows() throws Exception {
|
||||
final MonitorFilter filter = new MonitorFilter();
|
||||
try {
|
||||
filter.doFilter(request("198.51.100.10", 41000), response(new AtomicInteger()),
|
||||
(request, response) -> {
|
||||
throw new ServletException("expected test failure");
|
||||
});
|
||||
org.junit.Assert.fail("Expected the filter chain failure");
|
||||
} catch (final ServletException expected) {
|
||||
assertEquals("expected test failure", expected.getMessage());
|
||||
}
|
||||
assertEquals("Failed requests must not remain active", 0, ConnectionInfo.getServerCount());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void admitsRequestThatReachesConfiguredLimit() throws Exception {
|
||||
ConnectionInfo.setServerMaxcount(1);
|
||||
final AtomicInteger status = new AtomicInteger();
|
||||
final AtomicBoolean invoked = new AtomicBoolean();
|
||||
|
||||
new MonitorFilter().doFilter(request("198.51.100.11", 41001), response(status),
|
||||
(request, response) -> {
|
||||
invoked.set(true);
|
||||
assertEquals("The admitted request must occupy the available slot",
|
||||
1, ConnectionInfo.getServerCount());
|
||||
});
|
||||
|
||||
assertEquals("A request filling the final slot must not be rejected", 0, status.get());
|
||||
assertTrue("A request filling the final slot must invoke the filter chain", invoked.get());
|
||||
assertEquals("Completed requests must not remain active", 0, ConnectionInfo.getServerCount());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void enforcesServerConnectionLimitAtomically() throws Exception {
|
||||
ConnectionInfo.setServerMaxcount(1);
|
||||
final CountDownLatch ready = new CountDownLatch(2);
|
||||
final CountDownLatch start = new CountDownLatch(1);
|
||||
final CountDownLatch enteredFilterChain = new CountDownLatch(1);
|
||||
final CountDownLatch rejectedRequestFinished = new CountDownLatch(1);
|
||||
final CountDownLatch releaseFilterChain = new CountDownLatch(1);
|
||||
final AtomicInteger admitted = new AtomicInteger();
|
||||
final AtomicInteger rejected = new AtomicInteger();
|
||||
final AtomicReference<Throwable> failure = new AtomicReference<>();
|
||||
final AtomicInteger nextPort = new AtomicInteger(41010);
|
||||
final Runnable requestTask = () -> {
|
||||
ready.countDown();
|
||||
try {
|
||||
start.await();
|
||||
final AtomicInteger status = new AtomicInteger();
|
||||
new MonitorFilter().doFilter(
|
||||
request("198.51.100.12", nextPort.getAndIncrement()), response(status),
|
||||
(request, response) -> {
|
||||
admitted.incrementAndGet();
|
||||
enteredFilterChain.countDown();
|
||||
try {
|
||||
releaseFilterChain.await();
|
||||
} catch (final InterruptedException interrupted) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new ServletException(interrupted);
|
||||
}
|
||||
});
|
||||
if (status.get() == HttpServletResponse.SC_SERVICE_UNAVAILABLE) {
|
||||
rejected.incrementAndGet();
|
||||
rejectedRequestFinished.countDown();
|
||||
}
|
||||
} catch (final Throwable error) {
|
||||
failure.compareAndSet(null, error);
|
||||
}
|
||||
};
|
||||
final Thread first = new Thread(requestTask, "connection-limit-first");
|
||||
final Thread second = new Thread(requestTask, "connection-limit-second");
|
||||
|
||||
first.start();
|
||||
second.start();
|
||||
try {
|
||||
assertTrue("Concurrent requests were not ready", ready.await(5, TimeUnit.SECONDS));
|
||||
start.countDown();
|
||||
assertTrue("No request was admitted", enteredFilterChain.await(5, TimeUnit.SECONDS));
|
||||
assertTrue("Excess request was not rejected",
|
||||
rejectedRequestFinished.await(5, TimeUnit.SECONDS));
|
||||
assertEquals("Exactly one request may be admitted", 1, admitted.get());
|
||||
assertEquals("Exactly one excess request must be rejected", 1, rejected.get());
|
||||
assertEquals("The active request count must not exceed the limit",
|
||||
1, ConnectionInfo.getServerCount());
|
||||
} finally {
|
||||
start.countDown();
|
||||
releaseFilterChain.countDown();
|
||||
first.join(5_000L);
|
||||
second.join(5_000L);
|
||||
}
|
||||
|
||||
assertFalse("First request thread did not stop", first.isAlive());
|
||||
assertFalse("Second request thread did not stop", second.isAlive());
|
||||
if (failure.get() != null) {
|
||||
throw new AssertionError("Concurrent limit enforcement failed", failure.get());
|
||||
}
|
||||
assertEquals("Completed requests must not remain active",
|
||||
0, ConnectionInfo.getServerCount());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void releasesTrackingWhenAsynchronousRequestCompletes() throws Exception {
|
||||
final AtomicReference<AsyncListener> registeredListener = new AtomicReference<>();
|
||||
final AsyncContext asyncContext = (AsyncContext) Proxy.newProxyInstance(
|
||||
Jetty12HttpServerTest.class.getClassLoader(),
|
||||
new Class<?>[]{AsyncContext.class},
|
||||
(proxy, method, args) -> {
|
||||
if ("addListener".equals(method.getName())) {
|
||||
registeredListener.set((AsyncListener) args[0]);
|
||||
}
|
||||
return defaultValue(method.getReturnType());
|
||||
});
|
||||
|
||||
new MonitorFilter().doFilter(request("198.51.100.12", 41002, asyncContext),
|
||||
response(new AtomicInteger()), (request, response) -> {
|
||||
});
|
||||
|
||||
assertEquals("Async requests must remain active until completion",
|
||||
1, ConnectionInfo.getServerCount());
|
||||
assertNotNull(registeredListener.get());
|
||||
registeredListener.get().onComplete(null);
|
||||
assertEquals("Completed async requests must not remain active",
|
||||
0, ConnectionInfo.getServerCount());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void tracksConcurrentRequestsFromSameRemoteConnectionIndependently() throws Exception {
|
||||
final CountDownLatch enteredFilterChains = new CountDownLatch(2);
|
||||
final CountDownLatch releaseFilterChains = new CountDownLatch(1);
|
||||
final AtomicReference<Throwable> failure = new AtomicReference<>();
|
||||
final Runnable requestTask = () -> {
|
||||
try {
|
||||
new MonitorFilter().doFilter(request("127.0.0.1", 41003),
|
||||
response(new AtomicInteger()), (servletRequest, servletResponse) -> {
|
||||
enteredFilterChains.countDown();
|
||||
try {
|
||||
releaseFilterChains.await();
|
||||
} catch (final InterruptedException interrupted) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new ServletException(interrupted);
|
||||
}
|
||||
});
|
||||
} catch (final Throwable error) {
|
||||
failure.compareAndSet(null, error);
|
||||
}
|
||||
};
|
||||
final Thread first = new Thread(requestTask, "connection-tracking-first");
|
||||
final Thread second = new Thread(requestTask, "connection-tracking-second");
|
||||
|
||||
first.start();
|
||||
second.start();
|
||||
try {
|
||||
assertTrue("Both requests did not enter their filter chains",
|
||||
enteredFilterChains.await(5, TimeUnit.SECONDS));
|
||||
assertEquals("Each active request needs its own tracking entry",
|
||||
2, ConnectionInfo.getServerCount());
|
||||
} finally {
|
||||
releaseFilterChains.countDown();
|
||||
first.join(5_000L);
|
||||
second.join(5_000L);
|
||||
}
|
||||
|
||||
assertFalse("First request thread did not stop", first.isAlive());
|
||||
assertFalse("Second request thread did not stop", second.isAlive());
|
||||
if (failure.get() != null) {
|
||||
throw new AssertionError("Concurrent tracked request failed", failure.get());
|
||||
}
|
||||
assertEquals("Completed concurrent requests must not remain active",
|
||||
0, ConnectionInfo.getServerCount());
|
||||
}
|
||||
|
||||
private static Jetty12HttpServer trackedHttpServer() throws Exception {
|
||||
final Jetty12HttpServer httpServer = new Jetty12HttpServer(0, "127.0.0.1", 1, null, -1);
|
||||
final Field serverField = Jetty12HttpServer.class.getDeclaredField("server");
|
||||
serverField.setAccessible(true);
|
||||
final Server server = (Server) serverField.get(httpServer);
|
||||
|
||||
final ServletContextHandler webApp = new ServletContextHandler();
|
||||
webApp.setContextPath("/");
|
||||
webApp.addFilter(new FilterHolder(MonitorFilter.class), "/*",
|
||||
EnumSet.of(DispatcherType.REQUEST));
|
||||
webApp.addServlet(new ServletHolder(new HttpServlet() {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
protected void doGet(final HttpServletRequest request,
|
||||
final HttpServletResponse response) {
|
||||
response.setStatus(HttpServletResponse.SC_NO_CONTENT);
|
||||
}
|
||||
}), "/*");
|
||||
server.setHandler(webApp);
|
||||
return httpServer;
|
||||
}
|
||||
|
||||
private static String closeRequest(final int port, final String path) throws Exception {
|
||||
try (Socket client = new Socket("127.0.0.1", port)) {
|
||||
final OutputStream output = client.getOutputStream();
|
||||
output.write(("GET " + path + " HTTP/1.1\r\nHost: 127.0.0.1:" + port
|
||||
+ "\r\nConnection: close\r\n\r\n").getBytes(StandardCharsets.US_ASCII));
|
||||
output.flush();
|
||||
return readAll(client.getInputStream());
|
||||
}
|
||||
}
|
||||
|
||||
private static void assertTrackingReturnsToZero() throws InterruptedException {
|
||||
final long deadline = System.nanoTime() + 2_000_000_000L;
|
||||
while (ConnectionInfo.getServerCount() != 0 && System.nanoTime() < deadline) {
|
||||
Thread.sleep(10L);
|
||||
}
|
||||
assertEquals("Completed requests must not remain in the active server count",
|
||||
0, ConnectionInfo.getServerCount());
|
||||
}
|
||||
|
||||
private static HttpServletRequest request(final String remoteAddress, final int remotePort) {
|
||||
return request(remoteAddress, remotePort, null);
|
||||
}
|
||||
|
||||
private static HttpServletRequest request(final String remoteAddress, final int remotePort,
|
||||
final AsyncContext asyncContext) {
|
||||
return (HttpServletRequest) Proxy.newProxyInstance(
|
||||
Jetty12HttpServerTest.class.getClassLoader(),
|
||||
new Class<?>[]{HttpServletRequest.class},
|
||||
(proxy, method, args) -> switch (method.getName()) {
|
||||
case "getScheme" -> "http";
|
||||
case "getRemoteAddr", "getRemoteHost" -> remoteAddress;
|
||||
case "getRemotePort" -> remotePort;
|
||||
case "getMethod" -> "GET";
|
||||
case "getRequestURI" -> "/regression";
|
||||
case "isAsyncStarted" -> asyncContext != null;
|
||||
case "getAsyncContext" -> asyncContext;
|
||||
default -> defaultValue(method.getReturnType());
|
||||
});
|
||||
}
|
||||
|
||||
private static HttpServletResponse response(final AtomicInteger status) {
|
||||
return (HttpServletResponse) Proxy.newProxyInstance(
|
||||
Jetty12HttpServerTest.class.getClassLoader(),
|
||||
new Class<?>[]{HttpServletResponse.class},
|
||||
(proxy, method, args) -> {
|
||||
if ("sendError".equals(method.getName()) || "setStatus".equals(method.getName())) {
|
||||
status.set((Integer) args[0]);
|
||||
}
|
||||
return defaultValue(method.getReturnType());
|
||||
});
|
||||
}
|
||||
|
||||
private static Object defaultValue(final Class<?> type) {
|
||||
if (!type.isPrimitive()) return null;
|
||||
if (type == boolean.class) return false;
|
||||
if (type == byte.class) return (byte) 0;
|
||||
if (type == short.class) return (short) 0;
|
||||
if (type == int.class) return 0;
|
||||
if (type == long.class) return 0L;
|
||||
if (type == float.class) return 0.0f;
|
||||
if (type == double.class) return 0.0d;
|
||||
if (type == char.class) return '\0';
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/** Regression coverage for stale connection accounting cleanup. */
|
||||
public static class ConnectionInfoCleanupTest {
|
||||
|
||||
private static final long STALE_INIT_TIME =
|
||||
System.currentTimeMillis() - TimeUnit.MINUTES.toMillis(31);
|
||||
|
||||
@Before
|
||||
public void resetConnectionInfo() {
|
||||
ConnectionInfo.getAllConnections().clear();
|
||||
ConnectionInfo.getServerConnections().clear();
|
||||
}
|
||||
|
||||
@After
|
||||
public void clearConnectionInfo() {
|
||||
ConnectionInfo.getAllConnections().clear();
|
||||
ConnectionInfo.getServerConnections().clear();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void clientCleanupRemovesEveryStaleEntryFromClientPoolOnly() {
|
||||
ConnectionInfo.addConnection(connection(1001L, STALE_INIT_TIME));
|
||||
ConnectionInfo.addConnection(connection(1002L, STALE_INIT_TIME));
|
||||
ConnectionInfo.addConnection(connection(1003L, System.currentTimeMillis()));
|
||||
ConnectionInfo.addServerConnection(connection(2001L, STALE_INIT_TIME));
|
||||
|
||||
assertEquals("All stale client entries must be removed",
|
||||
2, ConnectionInfo.cleanUpClientConnections());
|
||||
assertEquals("The active client entry must remain", 1, ConnectionInfo.getCount());
|
||||
assertEquals("Client cleanup must not alter server entries",
|
||||
1, ConnectionInfo.getServerCount());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serverCleanupRemovesEveryStaleEntryFromServerPoolOnly() {
|
||||
ConnectionInfo.addServerConnection(connection(2001L, STALE_INIT_TIME));
|
||||
ConnectionInfo.addServerConnection(connection(2002L, STALE_INIT_TIME));
|
||||
ConnectionInfo.addServerConnection(connection(2003L, System.currentTimeMillis()));
|
||||
ConnectionInfo.addConnection(connection(1001L, STALE_INIT_TIME));
|
||||
|
||||
assertEquals("All stale server entries must be removed",
|
||||
2, ConnectionInfo.cleanUpServerConnections());
|
||||
assertEquals("The active server entry must remain", 1, ConnectionInfo.getServerCount());
|
||||
assertEquals("Server cleanup must not alter client entries",
|
||||
1, ConnectionInfo.getCount());
|
||||
}
|
||||
|
||||
private static ConnectionInfo connection(final long id, final long initTime) {
|
||||
return new ConnectionInfo("http", "example.test", "GET /", id, initTime, 0L);
|
||||
}
|
||||
}
|
||||
|
||||
/** Address/path rule adaptation to Jetty 12's native access handler. */
|
||||
public static class AccessRulesTest {
|
||||
|
||||
@@ -548,4 +931,22 @@ public class Jetty12HttpServerTest {
|
||||
input.transferTo(result);
|
||||
return result.toString(StandardCharsets.ISO_8859_1);
|
||||
}
|
||||
|
||||
static String readHeaders(final InputStream input) throws Exception {
|
||||
final ByteArrayOutputStream result = new ByteArrayOutputStream();
|
||||
int state = 0;
|
||||
int value;
|
||||
while ((value = input.read()) >= 0) {
|
||||
result.write(value);
|
||||
state = switch (state) {
|
||||
case 0 -> value == '\r' ? 1 : 0;
|
||||
case 1 -> value == '\n' ? 2 : 0;
|
||||
case 2 -> value == '\r' ? 3 : 0;
|
||||
case 3 -> value == '\n' ? 4 : 0;
|
||||
default -> state;
|
||||
};
|
||||
if (state == 4) break;
|
||||
}
|
||||
return result.toString(StandardCharsets.ISO_8859_1);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user