Cannot use kong.db #13375
Replies: 2 comments
-
This an issue in 3.7.0 too? I think I have a custom plugin that used kong.db.* so this may be problematic for me too if it is the case. But don't other kong native plugins access the db in the access phase too? Wonder why they would all not be having major issues too if so. |
Beta Was this translation helpful? Give feedback.
-
@123jixinyu Can you please provide a self-contained example with steps to reproduce the behavior? Many of our plugins use |
Beta Was this translation helpful? Give feedback.
-
Is there an existing issue for this?
Kong version (
$ kong version
)3.4 or 3.5 or 3.6
Current Behavior
During the development of custom Kong plugins, I found that I couldn't use kong.db to query entities. Whenever I executed kong.db.xxxx, the process would block, and the code could not proceed to the next step, though it could be used within ngx.timer.at. I have tried multiple versions of Kong, all with the same result. I am certain that I have taken the following measures:
1.Turned on the logging switch and set it to debug level.
2.Allowed in the execution phase, specifically in the access phase.
3.I tried using third-party libraries, such as luasql.postgres, which work perfectly.
4.The database is normal and connectable. I have checked the status API, and the database is accessible.
Demo
Expected Behavior
No response
Steps To Reproduce
No response
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions