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

slove memory leak when domain name changes very frequently #39

Open
Sunldon opened this issue Jun 20, 2024 · 1 comment
Open

slove memory leak when domain name changes very frequently #39

Sunldon opened this issue Jun 20, 2024 · 1 comment

Comments

@Sunldon
Copy link

Sunldon commented Jun 20, 2024

  1. When using (ngx_parse_url(ngx_cycle->pool, &u) != NGX_OK) to parse URLs, if the domain name changes very frequently, the memory occupied by ngx_cycle->pool will increase continually. This memory is only released when Nginx is reloaded. Creating a new memory pool can solve this issue.
  2. There is a memory leak in dynamic_server[i].previous_pool which needs to be checked if it is null. During the first assignment, dynamic_server->previous_pool = dynamic_server->pool, dynamic_server->pool is null. In the second assignment, it is assigned a new value (new_pool), hence the memory allocated for the previous new_pool is not released.
@Sunldon
Copy link
Author

Sunldon commented Jun 20, 2024

#38
this patch have resolved that problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant