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

"empty queue and can't wait for next element because there are too many DequeueOrWaitForNextElement() waiting" #38

Open
jfberry opened this issue Nov 25, 2023 · 1 comment

Comments

@jfberry
Copy link

jfberry commented Nov 25, 2023

getting this error thrown... except I only have a maximum of 3 waiters

This is how I dequeue - is there a problem with timing out and rechecking? Does that leak something?

	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	defer cancel()
	queuedElement, err := scoutQueue.DequeueOrWaitForNextElementContext(ctx)
	if err != nil {
		if err != context.DeadlineExceeded {
			log.Infof("SCOUT: Unexpected queue error: %s", err)
		}
		return nil
	}
@enriquebris
Copy link
Owner

Hi @jfberry,

Could you please provide an example (golang playground) producing this error?

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

No branches or pull requests

2 participants