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

Error logs about bytes allocation? #348

Open
darewreck54 opened this issue Nov 12, 2022 · 1 comment
Open

Error logs about bytes allocation? #348

darewreck54 opened this issue Nov 12, 2022 · 1 comment
Labels

Comments

@darewreck54
Copy link

darewreck54 commented Nov 12, 2022

What is the issue you are having?

I'm seeing this get printed out with a severity of error. I'm wondering is this something I need to worry about? If not, is there a reason why it reports as an error vs. a info or warn ?

2022/11/11 18:52:43 bytes_queue.go:117: Allocated new queue in 604.417µs; Capacity: 2522348 

image

I'm basically using the default configuration but

	LifeWindow = 30 * time.Minute
	Shards = 2048

I'm wondering is there a guide lines on how to properly configure the shards properly? Also sorry if this isn't the right forum to ask the question. I can move it somewhere else if you know a better forum for this quesiton.

Environment:
github.com/allegro/bigcache v1.2.1
go 1.18

@janisz
Copy link
Collaborator

janisz commented Nov 14, 2022

It's generated by this line

log.Printf("Allocated new queue in %s; Capacity: %d \n", time.Since(start), q.capacity)

and we are using logger from stdlib that prints to stderr so technically it's not an error as there are no severity/levels in stdlib (although there could be in the future Go proposal: structured logging).

If you see it often you can disable verbose or increase size to one mentioned in last log you see.

@janisz janisz added question and removed bug labels Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants