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

The available memory of the Kong machine suddenly dropped from 18G to 6.12G #13443

Closed
1 task done
fairyqb opened this issue Aug 1, 2024 · 5 comments
Closed
1 task done
Labels
pending author feedback Waiting for the issue author to get back to a maintainer with findings, more details, etc... stale

Comments

@fairyqb
Copy link
Contributor

fairyqb commented Aug 1, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Kong version ($ kong version)

kong all

Current Behavior

The available memory of the Kong machine suddenly dropped from 18G to 6.12G, and then recovered on its own. What are the possible reasons?

During this period, the number of requests did not increase, and other monitoring indicators were normal. Only the available memory of the machine fluctuated greatly.

kong-memory

Expected Behavior

What are the possible reasons?

Steps To Reproduce

No response

Anything else?

No response

@joelact
Copy link
Contributor

joelact commented Aug 3, 2024

Hey @fairyqb!
Do you have metrics about the memory consumed by the kong + nginx workers during that period? Do you have other services deployed on that machine?

@ProBrian ProBrian added the pending author feedback Waiting for the issue author to get back to a maintainer with findings, more details, etc... label Aug 5, 2024
@chobits
Copy link
Contributor

chobits commented Aug 15, 2024

It's difficult for us to determine the cause with only the physical memory stats provided.

I think you could also add some metrics to monitor the kong's lua/shdict memory statistics, like using this command:

$ curl -s localhost:8001/status| jq|pbcopy
{
  "database": {
    "reachable": true
  },
  "memory": {
    "workers_lua_vms": [
      {
        "pid": 83261,
        "http_allocated_gc": "47.10 MiB"
      }
    ],
    "lua_shared_dicts": {
      "kong": {
        "capacity": "5.00 MiB",
        "allocated_slabs": "0.05 MiB"
      },
      "kong_locks": {
        "capacity": "8.00 MiB",
        "allocated_slabs": "0.05 MiB"
      },
      "kong_healthchecks": {
        "capacity": "5.00 MiB",
        "allocated_slabs": "0.05 MiB"
      },
      "kong_cluster_events": {
        "capacity": "5.00 MiB",
        "allocated_slabs": "0.05 MiB"
      },
      "kong_rate_limiting_counters": {
        "capacity": "12.00 MiB",
        "allocated_slabs": "0.06 MiB"
      },
      "kong_core_db_cache": {
        "capacity": "128.00 MiB",
        "allocated_slabs": "0.28 MiB"
      },
      "kong_core_db_cache_miss": {
        "capacity": "12.00 MiB",
        "allocated_slabs": "0.06 MiB"
      },
      "kong_db_cache": {
        "capacity": "128.00 MiB",
        "allocated_slabs": "0.23 MiB"
      },
      "kong_db_cache_miss": {
        "capacity": "12.00 MiB",
        "allocated_slabs": "0.06 MiB"
      },
      "kong_secrets": {
        "capacity": "5.00 MiB",
        "allocated_slabs": "0.05 MiB"
      },
      "kong_dns_cache": {
        "capacity": "1.00 MiB",
        "allocated_slabs": "0.06 MiB"
      },
      "prometheus_metrics": {
        "capacity": "5.00 MiB",
        "allocated_slabs": "0.05 MiB"
      }
    }
  },
  "server": {
    "connections_writing": 2,
    "connections_waiting": 0,
    "total_requests": 7,
    "connections_active": 2,
    "connections_handled": 7,
    "connections_reading": 0,
    "connections_accepted": 7
  }
}

@chronolaw
Copy link
Contributor

chronolaw commented Aug 15, 2024

What is your kong version? What is the deploy mode (traditional or hybrid)? All these information are valuable for trouble shooting.

Copy link
Contributor

This issue is marked as stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Aug 30, 2024
Copy link
Contributor

github-actions bot commented Sep 6, 2024

Dear contributor,

We are automatically closing this issue because it has not seen any activity for three weeks.
We're sorry that your issue could not be resolved. If any new information comes up that could
help resolving it, please feel free to reopen it.

Your contribution is greatly appreciated!

Please have a look
our pledge to the community
for more information.

Sincerely,
Your Kong Gateway team

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending author feedback Waiting for the issue author to get back to a maintainer with findings, more details, etc... stale
Projects
None yet
Development

No branches or pull requests

5 participants