The content of the request log file varies slightly, depending upon whether it is treating Presentation API queries or Web services invocations.
[Timestamp] [Client IP Address] [Agraph Transaction ID] [HTTP Exchange ID] [Response Size] [Total Request Time] [Total Processing Time] [HTTP Return Code] [Number of Results] [Queue Status] [Thread ID] [Query String] [Query Body] [HTTP Headers]
These entries are listed in the order of the timestamp. Because of this, the entries are listed in the response order, not in the request order. The following table describes the log entries in more detail:
Column | Presentation API Queries or Web Services Invocations | Description |
---|---|---|
Timestamp | Both |
Time stamp indicating the time the request was completed, in milliseconds, since the epoch (January 1, 1970, 00:00:00 UTC). For example: 1208947882000=2008-04-23 10:51:22 AM GMT The time is recorded in GMT (not the localized time of the server). You can convert it using a UTC epoch converter utility, such as UTC. |
Client IP | Both | IP address of the requesting client. |
Agraph Transaction ID | Presentation API Queries |
Agraph transaction identifier. Note: This field is always empty unless the Dgraph is
running under an Agraph.
|
HTTP Exchange ID | Both |
Unique query identifier. This identifier allows you to correlate Dgraph request log items with error messages in the Dgraph log. In addition, it is used by the MDEX Server Statistics page to compose most expensive query statistics. Note: The identifier is only unique within a single
Dgraph instance, and is not persistent across Dgraph shutdown.
|
Response Size | Both | Number of bytes written to the client. May be less than or equal to the intended result size, for example, due to a premature session end. |
Total Request Time | Both | The request lifetime, in milliseconds.
Equal to the total amount of time between when the Dgraph reads the request
from the network and finishes sending the result. May include queuing time,
such as time spent waiting for earlier requests to be completed.
Note: In previous releases, the request lifetime ended when
the connection was closed. If connection close did not time out, this lifetime
would include the time to transport the response to the client, and the time
for the client to read the response. Starting with 6.1.0, the request lifetime
ends when the response has been successfully delivered to the socket layer.
|
Total Processing Time | Both |
Processing time, in milliseconds. Equal to the total computation time required for the Dgraph to handle the request, excluding network and wait time. This value gives an accurate measure of how expensive the request was to compute, given current system state. (That is, if the machine in question was busy with other threads or processes, the time may be longer than on an otherwise unused machine.) For any given query, Processing Time is always smaller than Total Request Time. |
HTTP Status Code | Both | The HTTP return code. A status code of 200 (OK) is returned if the request was successful. For details on other codes that can appear in this field, see the table below. |
Number of Results | Presentation API Queries |
Number of results from your query (or "-" if the HTTP request was not a query). Note: This number reflects the number of results, not
necessarily the number of results returned. That is, this is the number of
results from your query, not accounting for your
nbins and
offset settings.
nbins and
offset are used to specify how many of
the results are actually returned.
|
Queue Status | Both |
The number of threads busy when the request was received. This number is calculated when the request was received, thus this request is not included in this number. In previous releases, this column reported the number of threads busy (when Q was a positive number), or the number of query threads that are idle (when Q was a negative number). Starting with the MDEX Engine version 6.1.2, this column does not report the number of query threads that are idle because there is no longer a one-to-one relationship between threads and queries. Specifically, when you use the --threads flag to specify the number of threads to the MDEX Engine, the number you specify determines the total number of threads available to the MDEX Engine, which includes query processing threads and other threads that support query processing. As an implication, there is a greater chance that a non-saturated Dgraph could experience minor queuing, even in the case when the number of query requests in the queue is less than the number of threads specified. For more information, see the chapter in this guide about using the multithreaded mode. |
Thread ID | Both | The thread ID of the thread that was assigned the request (or “-” in single-threaded mode). |
Query String | Both | The URL of the Presentation API query or of the Web service. |
Query Body | Web Services Invocations | The URL-encoded POST body of the query. The actual entry in the request log is a single token, even though POST body can contain multiple lines of text. |
HTTP Headers | Both |
The URL-encoded HTTP headers that were sent with the query. The actual entry in the request log is a single token, even though HTTP headers can contain multiple lines of text. |
Status Code | Name | Condition |
---|---|---|
100 | Continue | In response to HTTP request header Expect: 100-continue (not an error) |
400 | Bad Request | Admin or config request with unsupported op |
400 | Bad Request | HTTP request line parse error, or HTTP request header parse error, or HTTP request Transfer-Encoding other than chunked |
400 | Bad Request | HTTP request with invalid chunk size or missing chunk terminator |
400 | Bad Request | HTTP request with invalid trailing header format |
400 | Bad Request | HTTP request with wildcard URL ("*") not valid for METHOD |
400 | Bad Request | HTTP request URL includes protocol other than "http", or protocol but no host, or neither protocol nor host and path does not start with "/" |
400 | Bad Request | HTTP request with version 1.1 but no Host |
400 | Bad Request | HTTP request with more data than expected |
400 | Bad Request | Conversion of POST body to string failed for web service request |
403 | Forbidden | Admin ops are disabled for the Dgraph, and admin?op=exit or admin?op=restart is requested |
404 | Not Found | Presentation API request with URI parse error or processing error |
404 | Not Found | Request has empty path, or admin or config request has additional path steps |
404 | Not Found | File server request for non-existent file or for a directory, or file outside of allowed root directory |
404 | Not Found | Web service request for unknown Web service |
408 | Request Time-out | Queue timeout exceeded for the request, or I/O timeout reading HTTP request |
410 | Gone | Presentation API request for unsupported feature |
411 | Length Required | HTTP POST request with Content-Length missing or empty or not a non-negative integer |
412 | Precondition Failed | HTTP request with "If-None-Match" header |
415 | Unsupported Media Type | Content-Type parse error in Web service request |
500 | Internal Server Error | Attempt to return informational status code to HTTP 1.0 client |
500 | Internal Server Error | Exception from XQuery evaluation in Web service request |
500 | Internal Server Error | Unhandled exception during request processing |
500 | Internal Server Error | admin?op=update is requested and no update directory was specified for the Dgraph |
501 | Not Implemented | HTTP request for unsupported Method (such as PUT) |
501 | Not Implemented | HTTP request includes an unsupported header that must not be ignored: ("Authorization", "Content-Encoding", "Content-Transfer-Encoding", "Range", "Content-Range", "If-Range") |
501 | Not Implemented | Presentation API request for disabled feature |
503 | Service Unavailable | HTTP request to server that is closed (in the process of shutting down) |
505 | HTTP Version Not Supported |
HTTP request with version not "1.0" and not "1.1" |