Skip to content

TFW logger: unreasonable number of messages in the logs #2523

@RomanBelozerov

Description

@RomanBelozerov

Describe the issue

  • Tempesta FW writes an unreasonable number of messages in the logs (See /var/log/tempestsa_access.log on tempesta-1). I saw 20 GB logs of logs in 30 minutes.
  • add a logger configuration check. I used clickhouse (old version) instead of access_log, but I didn't get an error;
  • Tempesta FW cannot create a connection to clickhouse for production VM (tempestsa-1) with master branch. But the release-0.8 branch on tempesta-2 works correctly. Tempesta FW is successfully built without pkgconf package, but logger don't work correcrtly. Build output:
...
make[1]: Leaving directory '/root/tempesta/libtus'
make -C logger
make[1]: Entering directory '/root/tempesta/logger'
make[1]: pkgconf: No such file or directory
make[1]: pkgconf: No such file or directory
make clickhouse
make[2]: Entering directory '/root/tempesta/logger'
make[2]: pkgconf: No such file or directory
make[2]: pkgconf: No such file or directory
git clone https://github.com/ClickHouse/clickhouse-cpp.git clickhouse-cpp
Cloning into 'clickhouse-cpp'...
mkdir -p clickhouse-cpp/build
cd clickhouse-cpp/build && cmake .. && make
...

Expected Behavior
A reasonable number of messages in the logs. For example - 1 msg per second.
Successful connection to the clickhouse

To Reproduce
run Tempesta FW on tempesta-1 for our webiste and call tail -n 50 /var/log/tempesta_access.log.

Configuration file
access log config in Tempesta FW

access_log mmap logger_config=/etc/tempesta/logger_config.json;

and logger config:

{
      "log_path": "/var/log/tempesta_access.log",
      "buffer_size": 8388608,
      "clickhouse": {
          "host": "172.17.0.3",  # or 192.168.122.1
          "port": 9000,
          "table_name": "access_log",
          "user": "tempesta",
          "password": "JyDuXHaN",
          "max_events": 1000,
          "max_wait_ms": 100
      }
}

Version or commit hash
kernel - 6.12.12.tfw-1493f1e
tempesta - c91bed2

Stacktrace or debug log
logs from tempesta_access.log

[2025-09-29 06:30:45.702] [access_logger] [error] [311036] A Clickhouse exception caught: fail to connect: Connection refused. Reset connection and reconnect in 0s.
[2025-09-29 06:30:45.702] [access_logger] [error] [311037] A Clickhouse exception caught: fail to connect: Connection refused. Reset connection and reconnect in 0s.
[2025-09-29 06:30:45.702] [access_logger] [error] [311036] A Clickhouse exception caught: fail to connect: Connection refused. Reset connection and reconnect in 0s.
[2025-09-29 06:30:45.702] [access_logger] [error] [311035] A Clickhouse exception caught: fail to connect: Connection refused. Reset connection and reconnect in 0s.
[2025-09-29 06:30:45.702] [access_logger] [error] [311036] A Clickhouse exception caught: fail to connect: Connection refused. Reset connection and reconnect in 0s.
[2025-09-29 06:30:45.702] [access_logger] [error] [311035] A Clickhouse exception caught: fail to connect: Connection refused. Reset connection and reconnect in 0s.
[2025-09-29 06:30:45.702] [access_logger] [error] [311037] A Clickhouse exception caught: fail to connect: Connection refused. Reset connection and reconnect in 0s.
[2025-09-29 06:30:45.702] [access_logger] [error] [311036] A Clickhouse exception caught: fail to connect: Connection refused. Reset connection and reconnect in 0s.

Core dump, environment, etc

# /etc/systemd/system/tempesta.service
[Unit]
Description=High performance HTTP proxy server
DefaultDependencies=false
After=network.target

[Service]
Type=oneshot
Environment="TFW_PATH=/root/tempesta/fw"
Environment="TDB_PATH=/root/tempesta/db/core"
Environment="TLS_PATH=/root/tempesta/tls"
Environment="LIB_PATH=/root/tempesta/lib"
Environment=TFW_CFG_PATH=/etc/tempesta/tempesta_fw.conf
Environment="TFW_SYSTEMD=1"
RemainAfterExit=yes
ExecStart=/root/tempesta/scripts/tempesta.sh --start
ExecStopPost=/root/tempesta/scripts/tempesta.sh --stop
ExecReload=/root/tempesta/scripts/tempesta.sh --reload
TimeoutSec=infinity

[Install]
WantedBy=multi-user.target

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions