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

fix(external-plugins): use lowercase for comparing string in error condition #7153

Merged
merged 1 commit into from
May 19, 2021

Conversation

ealogar
Copy link
Contributor

@ealogar ealogar commented May 13, 2021

Summary

When an instance_id of a plugin external changes, the plugin instance pretended to be reseted and retried in the bridge event loop again.
This was failing and none was being retried, making the call to the plugin did not happen; it was due to a typo in the comparisson.
This has been identified and tested with heavy traffic when the kong balancer is refreshed and reload into memoy cache; it was not failing with low traffic.

Issues resolved

Fix #7148

…ndition

When an instance_id of a plugin external changes, the plugin instance is resetted and retried in the bridge event loop again.
This was failing and none was being retries due to a typo in the comparisson.
This has been identified and tested with heavy traffic when the kong balancer is refreshed and reload into memory, it was not failing with low traffic.
@ealogar
Copy link
Contributor Author

ealogar commented May 13, 2021

16 hours load test without any failures @javierguerragiraldez , Now you can decide if do the fix just in 2.4 or port it to 2.3 as well

@ealogar
Copy link
Contributor Author

ealogar commented May 15, 2021

I have seen in logs of nginx too many times (in high load) the folllowing annonying log:

2021/05/15 17:37:16 [error] 27#0: *855540 [kong] mp_rpc.lua:308 [jwe] no plugin instance 0, client: 10.240.2.28, server: kong, request: "POST /token HTTP/1.1", host: "example.es"

As this error is retried later and the request will succed an call the plugin, I would either change the log level to notice or even remove the error log.
Maybe a control of max retries would be interesting as well...

What do you think @javierguerragiraldez ?

@dndx dndx merged commit 4fe108f into Kong:master May 19, 2021
@ealogar ealogar deleted the fix/reset_plugin_instance branch May 19, 2021 20:40
@palmerabollo
Copy link

I agree that the error is annoying and makes it difficult to operate kong. Would it be possible to change it to level "notice" @javierguerragiraldez?

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

Successfully merging this pull request may close these issues.

no plugin instance error appears when renewing the cache (KONG_DB_CACHE_TTL parameter) with custom go plugin
4 participants