Skip to content

slove memory leak when domain name changes very frequently #39

Open
@Sunldon

Description

@Sunldon
  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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions