-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Kong1.3 with pgsql in k8s generate a large number of dropping event logs #5578
Comments
looks like eventdata gets evicted before being used from the SHM. So either shm too small, or number of events too high. Do you use a custom nginx configuration template? did you modify the SHM sizes? If the shm size is too small, events may get evicted prematurely. How many worker-processes do you have? In the logs above I see
That seems to be a bad idea, iirc in a k8s environment you need to set the number of CPU's assigned to the docker container. By default the value will be set to the number of CPU core's in the machine, as in hardware, not the number assigned to the docker container. So if you get way too many workers, you may also get way more events, that would fill up the shm, and cause some to be evicted. |
Possibly relevant: thibaultcha/lua-resty-mlcache#88 |
@Tieske thank you apply |
@w313062006 thx for trying. Please provide feedback on how that goes, because we might need to bump the default shm size if it fails on a 48core machine. @p0pr0ck5 Not sure that is relevant, iirc that issue is an issue if a worker process crashes down the line, and it still tries to replay events from hours, or even days ago. This issue is during start up. Just to verify @w313062006 ; it only happens during start up right? |
@Tieske |
@w313062006 if they happen again, can you post the full logs? (as an attachment) |
@Tieske hi, I come back to report my test result. first, your suggestion is correct, thank you! from these test, I hava some questions and view |
@w313062006 thx for testing it. It confirms the hypothesis. Regarding your tests:
Your questions:
So in your case:
|
@w313062006 would you mind telling me how many entities you have configured in the system? (routes/services/consumers/plugins/upstreams ?) |
@Tieske |
@Tieske so, is machine load related to errors occur? |
I watch one kong instance :8001/status,when error happen, kong_process_events not full |
getting these errors is problematic, it leaves the system in an undetermined state, so should be avoided in any case. At some point you'll start seeing other anomalies originating from this. When looking at |
@Tieske |
are you sure they are the same errors? as in your original post? can you post the logs somehwere? |
That's weird, difference seems to big for fragmentation |
the worker-events lib had a fix for some memory issues in version 1.0.0, that version was already in Kong 1.3.0. So that cannot be the issue. Can you send the full logs? even if they are big, just zip'em and upload them somewhere |
@Tieske |
Let's close this for now. We can always reopen when the problem returns. |
@Tieske when I hard code like Kong/kubernetes-ingress-controller#1212, the dropping event error is miss and the kong_process_event is not full (before the hard code, when kong start up, kong_process_event will full quickly ) if the number of upstreams & routes is large, the resource change event is large, the dropping event error more likely happen |
@w313062006 To be clear, do you see the problem happening even after filling in the missing defaults in the controller? |
@hbagdi yes, before hard code, dropping event will happen, but not cause request error, so I don't handle them. but when hard code done, the dropping event error not happen, so I think this two issue is related |
Could be. You are using Kong 1.5 which is relatively older. If you observe the problem with a relatively recent version of Kong, please provide reproducible steps and open a new issue (link this one). |
ok, I will, thx reply |
Summary
I deploy kong1.3(also test kong 1.4) in k8s(1.15.5) with a postgres,
I See a large number of dropping event logs periodically, hundreds of thousands...
someone know what happen? I find a issue #3417, but in this issue, dropping events is generated when kong is start up
Additional Details & Logs
the period is some minutes
kong in k8s
The text was updated successfully, but these errors were encountered: