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

CPU/Memory leak issue caused by go routines that never completes #636

Closed
ilkercelikyilmaz opened this issue Mar 3, 2019 · 4 comments
Closed
Labels
kind/bug These are bugs.
Milestone

Comments

@ilkercelikyilmaz
Copy link
Contributor

I was running a load/stress test to allocated 10K gameservers every 30 minutes (gameservers shutdowns in 10 minutes after allocation). The performance of the Agones was deteriorating with everyone run. It turns out the 10K+ go routines that are created with every run never completes. In about 7 hours around the total number of go routines reached 400K.

image

The issue id being caused because of WaitForCacheSync call in gameserver creation. Under huge number of calls, cache never syncs and all the go routines continue to wait indefinitely.

This can be related to #414 .

Working on a fix now. Will submit a PR.

@aLekSer
Copy link
Collaborator

aLekSer commented Mar 3, 2019

Hello @ilkercelikyilmaz , this seems the same old issue, but reopened after dep ensure execution and I suppose was fixed as previously in:
1bdd5a5
So please update and rerun your test, at least starting part. 😄

@ilkercelikyilmaz
Copy link
Contributor Author

Hi @aLekSer ,
You are right this fixes the issue. However I got it fixed locally by removing the call WaitForCacheSync.
I've tested with the fix only (without removing the WaitForCacheSync). There is no more leak but the GS creation with the WaitForCacheSync and it takes longer under the load test.
Do you think we can close the #414 ?
Thanks,
ilker

@aLekSer
Copy link
Collaborator

aLekSer commented Mar 4, 2019

Thanks @ilkercelikyilmaz for checking it with updated master.
Regarding this Memory leak ticket I think you should close this and open new ticket or Pull Request with different description if you see some other problem with WaitForCacheSync() function.
WaitForCacheSync() uses WaitFor() undernearth through next function:

func PollUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan struct{}) error {
	return WaitFor(poller(interval, 0), condition, stopCh)
}

So fixing WaitFor helps here also.

@ilkercelikyilmaz
Copy link
Contributor Author

Since the cpu/memory leak issue fixed with 1bdd5a5 closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug These are bugs.
Projects
None yet
Development

No branches or pull requests

3 participants