Skip to content

Conversation

@madhawa-gunasekara
Copy link
Member

Description

This will close httpc connection. We observed too many connections in activemq.

Fixes #11449

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@shreemaan-abhishek
Copy link
Contributor

great catch 🙏🏼 , could you please check if this bug exists in other plugins/places too?

@madhawa-gunasekara madhawa-gunasekara force-pushed the issue-11449 branch 2 times, most recently from c331336 to 72ca229 Compare July 31, 2024 11:59
Copy link
Contributor

@zhoujiexiong zhoujiexiong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about reusing socket by request_uri + keepalive instead of new + close socket every time?

like plugins/forward-auth:
image

}
})

connection_util.close_http_connection(client)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

request_uri will close(sock) before returning, so this line is not necessary? The same is true elsewhere of the PR.

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 will remove it.

@shreemaan-abhishek
Copy link
Contributor

@madhawa-gunasekara, please avoid force pushing 🙂 I have told this before.

@zhoujiexiong
Copy link
Contributor

Ping @madhawa-gunasekara :D

@zhoujiexiong
Copy link
Contributor

Ping @madhawa-gunasekara

:D

@madhawa-gunasekara
Copy link
Member Author

Hi @zhoujiexiong,

I was traveling, I will push the changes. :)

@zhoujiexiong zhoujiexiong mentioned this pull request Sep 4, 2024
5 tasks
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 24, 2024
@madhawa-gunasekara
Copy link
Member Author

@zhoujiexiong I did the changes.. please review

@madhawa-gunasekara
Copy link
Member Author

@zhoujiexiong Ping, any chance to look into this

@github-actions
Copy link

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 28, 2024
@github-actions
Copy link

This pull request/issue has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files. stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: http connections not closed in http-logger plugin

3 participants