Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache: uninformative messages for cache_size #2251

Open
2 tasks
RomanBelozerov opened this issue Sep 23, 2024 · 1 comment
Open
2 tasks

cache: uninformative messages for cache_size #2251

RomanBelozerov opened this issue Sep 23, 2024 · 1 comment
Labels
cache enhancement good to start Start form this tasks if you're new in Tempesta FW low priority
Milestone

Comments

@RomanBelozerov
Copy link
Contributor

Scope

We have two problems with uninformative messages:

  • ERROR when response body is larger then cache_size:
[254366.985392] [tdb] ERROR: out of free space
[254366.986204] [tempesta fw] ERROR: Cache: cannot copy chunk of HTTP body
[254366.986980] [tempesta fw] ERROR: Cache: cannot copy HTTP body

or

[254387.215313] [tdb] ERROR: out of free space
[254387.216100] [tdb] ERROR: Cannot burst node=00000000285fa02e and bckt=000000007f491702 for key 0x275decc81f1ae60a
[254387.216822] [tdb] ERROR: Cannot allocate cache entry for key=0x275decc81f1ae60a

In this case, I expect a warning in dmesg. For example: [tempesta fw] Warning: The response body is too large to cache or there is not enough space in the cache. Please increase 'cache_size' or change 'cache_fulfill'

  • ERROR when cache_size > tempesta_dbmem
[255215.935105] [tdb] Opened table /opt/tempesta/db/filter0.tdb: size=16777216 rec_size=20 base=00000000147db6e5
[255215.936465] [tdb] ERROR: Cannot allocate 262144 pages at node 0
[255215.937231] [tdb] ERROR: Cannot map file
[255215.938009] [tdb] ERROR: Cannot open db for /opt/tempesta/db/cache.tdb
[255215.938844] [tempesta fw] ERROR: Unable to start module 'cache': -12

I also expect a warning in dmesg. For example: [tempesta fw] Warning: 'cache' size is greater then 'tempesta_dbmem'. Please increase 'tempesta_dbmem'. See https://tempesta-tech.com/knowledge-base/Run-and-stop/#prepare-to-start

Testing

We don't have tests for these cases. Please add tests or create issue in tempesta-test.

@RomanBelozerov RomanBelozerov added enhancement low priority cache good to start Start form this tasks if you're new in Tempesta FW labels Sep 23, 2024
@krizhanovsky
Copy link
Contributor

We also should reduce the amount of printing to not flood the kernel log

@krizhanovsky krizhanovsky added this to the 1.0 - GA milestone Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cache enhancement good to start Start form this tasks if you're new in Tempesta FW low priority
Projects
None yet
Development

No branches or pull requests

2 participants