5.6. Сбои взаимодействия с PPEM #
5.6.1. Ошибка «HTTP Status Code 500» #
При отправке метрик для 10 000 таблиц и индексов PPEM через otlp_http в журналах pgpro-otel-collector может появиться следующая ошибка:
{
"level": "error",
"ts": "2025-09-05T17:44:37.351+0300",
"msg": "Exporting failed. Dropping data.",
"resource": {
"service.instance.id": "62cc1e9c-a53f-423e-9c6f-41b1f6a0872a",
"service.name": "pgpro-otel-collector",
"service.version": "v0.4.0"
},
"otelcol.component.id": "otlp_http/ppem_metrics",
"otelcol.component.kind": "exporter",
"otelcol.signal": "metrics",
"error": "not retryable error: Permanent error: rpc error: code = Unknown desc = error exporting items, request to http://192.168.21.147:80/v1/metrics responded with HTTP Status Code 500, Message=, Details=[]",
"dropped_items": 393313
}Ошибка может указывать на то, что PPEM не может обработать пакет метрик за один запрос. Используйте процессор batch, чтобы разделить запрос к PPEM на несколько частей. Задайте значение для параметра send_batch_max_size:
processors:
batch/metrics:
send_batch_size: 8192
send_batch_max_size: 8192
timeout: 10s
...Этот параметр позволяет разделять крупные запросы на пакеты, в каждом из которых содержится по 8 192 метрики. После определения этого параметра убедитесь, что очередь на отправку со временем не переполняется:
curl 127.0.0.1:8888/metrics | grep queue_size
5.6.2. Ошибка «sending queue is full» (очередь отправки переполнена) #
По умолчанию максимальный размер очереди — 1000 элементов. Чем больше элементов в очереди, тем больше оперативной памяти требуется pgpro-otel-collector.
Если очередь переполняется, в журналах коллектора появляется следующая ошибка:
{
"level": "warn",
"ts": "2025-09-22T15:24:45.161+0300",
"msg": "Sender failed",
"resource": {
"service.instance.id": "8859d053-3485-4a61-bc28-8d839bc9e20f",
"service.name": "pgpro-otel-collector",
"service.version": "v0.4.0"
},
"otelcol.component.id": "batch/metrics",
"otelcol.component.kind": "processor",
"otelcol.pipeline.id": "metrics",
"otelcol.signal": "metrics",
"error": "sending queue is full"
}Ошибка означает, что данные сбрасываются до отправки в PPEM. В этом случае необходимо уменьшить количество метрик, отправляемых в PPEM, или увеличить размер очереди. Пример конфигурации очереди:
exporters:
otlp_http/ppem_metrics:
sending_queue:
enabled: true
queue_size: 1000
...Кроме того, можно увеличить значение batch/metrics.timeout, а также глобальный интервал сбора метрик, чтобы они собирались реже.
Повторная передача пакетов в случае возникновения ошибки включена по умолчанию. Пример конфигурации:
exporters:
otlp_http/ppem_metrics:
retry_on_failure:
initial_interval: 5s
max_interval: 30s
max_elapsed_time: 300s
multiplier: 1.5
...В примере указаны значения по умолчанию. Полный набор параметров конфигурации очереди и повторной передачи доступен в документации OpenTelemetry.
5.6.3. Ошибки тайм-аута #
Следующая ошибка связана с тайм-аутом, заданным на стороне PPEM:
{
"level": "info",
"ts": "2025-09-05T18:20:28.465+0300",
"msg": "Exporting failed. Will retry the request after interval.",
"resource": {
"service.instance.id": "b225f72c-f753-4816-85ef-57a982a0392c",
"service.name": "pgpro-otel-collector",
"service.version": "v0.4.0"
},
"otelcol.component.id": "otlp_http/ppem_metrics",
"otelcol.component.kind": "exporter",
"otelcol.signal": "metrics",
"error": "failed to make an HTTP request: Post \"http://192.168.21.147:80/v1/metrics\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)",
"interval": "4.905832986s"
}Увеличьте тайм-аут на стороне PPEM следующим образом:
http:
server:
timeout: 5m # Укажите своё значениеДругая ошибка может быть связана с тайм-аутом, указанном на стороне pgpro-otel-collector, как правило, для журналов и метрик:
{
"level": "error",
"ts": 1752593436.7439601,
"msg": "Exporting failed. Dropping data.",
"kind": "exporter",
"data_type": "logs",
"name": "otlp_http/ppem_logs",
"error": "no more retries left: failed to make an HTTP request: Post \"http://192.168.22.114:80/v1/logs\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)",
"dropped_items": 1
}Увеличьте тайм-аут, указанный на стороне pgpro-otel-collector:
exporters:
otlp_http/elastic_logs:
timeout: 1m
...
otlp_http/ppem_logs:
timeout: 1m
...
otlp_http/ppem_metrics:
timeout: 1m
...Обе ошибки могут также свидетельствовать о том, что PPEM или pgpro-otel-collector не хватает ресурсов процессора для корректной работы с указанными параметрами плагинов.
5.6. PPEM Communication Failures #
5.6.1. Error “HTTP Status Code 500” #
When sending metrics for 10,000 tables and indexes to PPEM via otlp_http, you may encounter the following error in pgpro-otel-collector logs:
{
"level": "error",
"ts": "2025-09-05T17:44:37.351+0300",
"msg": "Exporting failed. Dropping data.",
"resource": {
"service.instance.id": "62cc1e9c-a53f-423e-9c6f-41b1f6a0872a",
"service.name": "pgpro-otel-collector",
"service.version": "v0.4.0"
},
"otelcol.component.id": "otlp_http/ppem_metrics",
"otelcol.component.kind": "exporter",
"otelcol.signal": "metrics",
"error": "not retryable error: Permanent error: rpc error: code = Unknown desc = error exporting items, request to http://192.168.21.147:80/v1/metrics responded with HTTP Status Code 500, Message=, Details=[]",
"dropped_items": 393313
}
This may indicate that PPEM cannot process the metrics batch within a single request. Use the batch processor to split the request to PPEM into smaller parts. Make sure to specify the send_batch_max_size parameter:
processors:
batch/metrics:
send_batch_size: 8192
send_batch_max_size: 8192
timeout: 10s
...
This parameter splits large requests into batches of 8,192 metrics each. After setting this parameter, ensure the sending queue does not overflow over time:
curl 127.0.0.1:8888/metrics | grep queue_size
5.6.2. Error “sending queue is full” #
The default maximum queue size is 1,000 elements. The more elements in the queue, the more RAM pgpro-otel-collector requires.
If the queue is full, the following error appears in the collector logs:
{
"level": "warn",
"ts": "2025-09-22T15:24:45.161+0300",
"msg": "Sender failed",
"resource": {
"service.instance.id": "8859d053-3485-4a61-bc28-8d839bc9e20f",
"service.name": "pgpro-otel-collector",
"service.version": "v0.4.0"
},
"otelcol.component.id": "batch/metrics",
"otelcol.component.kind": "processor",
"otelcol.pipeline.id": "metrics",
"otelcol.signal": "metrics",
"error": "sending queue is full"
}
This means data is being dropped before being sent to PPEM. You need to reduce the number of metrics sent to PPEM or increase the queue size. Example queue configuration:
exporters:
otlp_http/ppem_metrics:
sending_queue:
enabled: true
queue_size: 1000
...
Additionally, you can increase batch/metrics.timeout and the global collection interval to collect metrics less frequently overall.
Retransmission of failed batches is enabled by default. Example configuration:
exporters:
otlp_http/ppem_metrics:
retry_on_failure:
initial_interval: 5s
max_interval: 30s
max_elapsed_time: 300s
multiplier: 1.5
...
The example shows default values. The complete set of queue and retry configuration options is available in the OpenTelemetry documentation.
5.6.3. Timeout Errors #
The following error is related to the timeout specified on the PPEM side:
{
"level": "info",
"ts": "2025-09-05T18:20:28.465+0300",
"msg": "Exporting failed. Will retry the request after interval.",
"resource": {
"service.instance.id": "b225f72c-f753-4816-85ef-57a982a0392c",
"service.name": "pgpro-otel-collector",
"service.version": "v0.4.0"
},
"otelcol.component.id": "otlp_http/ppem_metrics",
"otelcol.component.kind": "exporter",
"otelcol.signal": "metrics",
"error": "failed to make an HTTP request: Post \"http://192.168.21.147:80/v1/metrics\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)",
"interval": "4.905832986s"
}
On the PPEM side, increase the timeout as follows:
http:
server:
timeout: 5m # Specify your value
Another error may be related to the timeout specified on the pgpro-otel-collector side, typically for logs and metrics:
{
"level": "error",
"ts": 1752593436.7439601,
"msg": "Exporting failed. Dropping data.",
"kind": "exporter",
"data_type": "logs",
"name": "otlp_http/ppem_logs",
"error": "no more retries left: failed to make an HTTP request: Post \"http://192.168.22.114:80/v1/logs\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)",
"dropped_items": 1
}
Increase the timeout by specifying your values on the pgpro-otel-collector side:
exporters:
otlp_http/elastic_logs:
timeout: 1m
...
otlp_http/ppem_logs:
timeout: 1m
...
otlp_http/ppem_metrics:
timeout: 1m
...
Both errors may indicate that PPEM or pgpro-otel-collector lacks sufficient CPU resources to function properly with the specified plugin settings.