Hi all, I use <https://github.com/growthbook/growt...
# ask-questions
c
Hi all, I use https://github.com/growthbook/growthbook-golang SDK to integrate with Growthbook. And use AutoFresh to get Latest Features on Growthbook Dashboard. After monitor logs, I see that goroutines alway increase. Does anyone have the same problem? Many thanks
f
I know a new version of the go SDK is under development
c
Oh, That's sound good. When is it released ?
f
@freezing-postman-69602 ?
c
f
Yeah, the next release is in progress and should be out by next week.
m
@freezing-postman-69602 is it visible anywhere what this release will be, is it the PR from Mikl Kurkov?
f
yeah, that PR is going to be the major chunk!
🙌 2
c
Hi team, Many thanks for release v0.2.0 Golang SDK. I have apply it for my service and it's seem to work well. But, I find some the logs the below:
Copy code
INFO Reconnect source="Growthbook SSE datasource" reason="request failed: connection to server lost: EOF" delay=14.520022277s
So, what need I do to stop write this log ? a @freezing-postman-69602
m
You can add your own logger to the construction of the GrowthbookClient: https://github.com/growthbook/growthbook-golang/blob/main/client_option.go#L121
If you don't set it it opens a default slog logger, you can probably set a global level on that if you don't want to initialize a new logger. Check the docs for slog on that.
c
Thanks @most-match-36440, but It's not what I want to mention. I want to know why I find this log. Is there any error in the process of running?
m
Ah you don't want to silence it but rather resolve it. Well, it shows that the connection to the SSE server is lost, which means exactly that. You could try capturing traffic to see why the connection is dropped. The EOF means that the connection was abruptly ended, which points towards a network or system issue. But, do note that it is an "info" message as this just means that the SDK needs to reconnect to the Growthbook server: • https://github.com/growthbook/growthbook-golang/blob/fa5077ed5bcf35a6c85333e63c25e87d7241b56d/datasource_sse.go#L88
👍 1
c
So, It's a INFO message And It's not ERROR. And I do nothing. Right ? @most-match-36440
m
Yes, while indicative on an issue, when the connection really breaks it should log an error as far as I'm aware
1
m
Hi @cool-elephant-31930, SDK developer here. Have you noticed any pattern in the reconnection times—like it closing every 5 minutes? As mentioned, reconnections are normal, which is why they're logged as INFO. The connection is only used to download changed features; the SDK works with locally cached feature definitions. So these occasional reconnections aren’t necessarily a big problem. I'll look into this further and see if we can improve the SSE behavior.