[go-nuts] Re: [mysql] 2017/12/23 11:09:37 packets.go:141: write tcp 127.0.0.1:20630->127.0.0.1:3306: write: broken pipe
I am seeing similar logs even after I add db.SetConnMaxLifetime(10 * time.Second). Test code here: https://play.golang.org/p/itTUXDYv4Ge Any suggestions on how to debug further? On Monday, December 25, 2017 at 12:10:02 PM UTC+5:30, Naoki INADA wrote: > > >> >> To prevent further errors set connection lifetime to value less than >> configured. >> >> >> eg. db.SetConnMaxLifetime(time.Second * 14400) >> >> >> > Thanks, but I (go-sql-driver/mysql maintainer) recommend 10~60 sec > rather than 1/2 of wait_timeout. > > wait_timeout is not the only reason which close TCP connection. > TCP connection may be killed by various reasons. (OS, router, etc...) > > When people ask this question, they doesn't have enough skill to > check all possibilities by themselves. > On the other hand, 10sec is large enough to reduce overhead of > reconnection. > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: Go Community Charity Work?
Sure it's enough. But how do you fight against Bauer (instead of Bayer), or do I know the proper spelling of GSK? Like Adidas vs. Adios... -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: Go Community Charity Work?
Let's use QR codes then! Do we have to have a central registry/key server if we verify a domain's certificate? Isn't that enough to tell us that that domain and, hence, that public key is owned by that manufacturer? Or am I getting something wrong? How does Chrome know that a site's cert is good and valid? How are certificate authorities (CAs) overseen? On Wednesday, December 27, 2017 at 1:10:50 AM UTC-5, Tamás Gulácsi wrote: > > We have to enforce some kind of central registry for the manufacturers, to > avoid that anybody can create a key pair, use our software, and have vald > unique verifiable codes, but be a drug counterteiter. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Resolving *ast.Ident without access to package imports
I would like to parse the following and determine that "have.Bar" is a "Bar" from package "some/package/i/dont/have", with the caveat that I don't have access to that package. package foo import "some/package/i/dont/have" type Foo struct { have.Bar } In other words, the ideal function (depending implicitly on the entire file) for me would be: func GetSource(id *ast.Ident) (fullPackage string, err error) var Bar *ast.Ident // Gotten from an ast walk GetSource(Bar) == "some/package/i/dont/have", nil As suggested at https://github.com/golang/example/tree/master/gotypes#identifier-resolution, I am trying to use the types package to map each identifier to an object. However, I don't have access to "some/package/i/dont/have" so I am getting an import error (see https://play.golang.org/p/91We3222_Yx), I assume because any actual typechecking would need to go into the package to get the underlying type. Any recommendations on how I can implement this "shallow" type retrieval without access to imports? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: golang gc time STW1=>Mark=>STW2
Yes, please see the description of the operation of th garbage collector. https://github.com/golang/go/blob/master/src/runtime/mgc.go#L66 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: golang gc time STW1=>Mark=>STW2
195+0.26+0.025 ms 0.065+0.82+0.041 ms 242+0.32+0.016 ms 0.010+0.37+0.039 ms 233+0.33+0.014 ms version go1.9.2 I want to ask why the third phrase mark-termination time is always short, it also need STW ?? 在 2017年12月27日星期三 UTC+8下午5:14:52,Dave Cheney写道: > > I’m sorry I don’t understand the question you are asking but what I see > from those gc times is your go busy() goroutine is blocking the STW1 phase > because Go cannot currently preempt running functions. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] golang gc time STW1=>Mark=>STW2
I’m sorry I don’t understand the question you are asking but what I see from those gc times is your go busy() goroutine is blocking the STW1 phase because Go cannot currently preempt running functions. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] [ANN] Microservices/function as a service platform writte in Go
Hi guys! I just thought about dropping this here: https://github.com/1backend/1backend It is a microservices/faas/serverless platform that (hopes to) enable you to write applications in multiple languages as easy as doing it in one language/monolithic application. Take care -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] golang gc time STW1=>Mark=>STW2
package main import ( "runtime" _ "net/http/pprof" "net/http" "time" ) var ch = make(chan struct{},1) func printMem() { var mem runtime.MemStats runtime.ReadMemStats() println(mem.HeapObjects) } func easy() { <-ch } func bussy() { sum := 0 for i:=0;i<1000;i++ { for j:=0;j<1*10;j++ { sum++ } time.Sleep(time.Duration(100+i/10)*time.Millisecond) } } func main() { for i:=0;i<1;i++ { //go easy() go bussy() } ticker := time.NewTicker(3*time.Second) for range ticker.C { runtime.GC() } http.ListenAndServe(":9090",nil) } gc 1 @3.007s 0%: 195+0.26+0.025 ms clock, 587+0/0.21/0.44+0.077 ms cpu, 1->1->0 MB, 4 MB goal, 4 P (forced) gc 2 @6.006s 0%: 0.065+0.82+0.041 ms clock, 0.26+0/0.71/0.51+0.16 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 3 @9.005s 0%: 242+0.32+0.016 ms clock, 971+0/0.045/0.36+0.064 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 4 @12.005s 0%: 0.010+0.37+0.039 ms clock, 0.040+0/0.32/0.68+0.15 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 5 @15.004s 0%: 233+0.33+0.014 ms clock, 932+0/0.050/0.36+0.059 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 6 @18.006s 0%: 0.016+0.19+0.016 ms clock, 0.064+0/0.16/0.33+0.066 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 7 @21.003s 0%: 276+0.30+0.049 ms clock, 1104+0/0.044/0.33+0.19 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 8 @24.002s 0%: 52+0.23+0.019 ms clock, 211+0/0.20/0.37+0.076 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 9 @27.002s 0%: 270+0.23+0.013 ms clock, 1080+0/0.21/0.37+0.053 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 10 @30.002s 0%: 59+0.48+0.029 ms clock, 239+0/0.44/0.10+0.11 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 11 @33.002s 0%: 339+0.32+0.014 ms clock, 1356+0/0.29/0.44+0.058 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 12 @36.004s 0%: 286+0.45+0.038 ms clock, 1145+0/0.40/0.13+0.15 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 13 @39.006s 0%: 123+0.38+0.023 ms clock, 493+0/0.36/0.66+0.094 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 14 @42.005s 0%: 0.016+0.26+0.015 ms clock, 0.064+0/0.25/0.41+0.062 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 15 @45.005s 0%: 278+0.33+0.020 ms clock, 1113+0/0.29/0.28+0.082 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 16 @48.004s 0%: 128+0.22+0.039 ms clock, 514+0/0.13/0.40+0.15 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 17 @51.004s 0%: 0.014+0.34+0.020 ms clock, 0.056+0/0.053/0.39+0.081 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 18 @54.006s 0%: 331+0.23+0.017 ms clock, 1325+0/0.19/0.35+0.070 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 19 @57.002s 0%: 179+0.30+0.017 ms clock, 717+0/0.044/0.32+0.068 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) gc 20 @60.004s 0%: 0.009+0.47+0.033 ms clock, 0.038+0/0.36/0.77+0.13 ms cpu, 0->0->0 MB, 4 MB goal, 4 P (forced) version golang 1.9.2 I doubt the gc time: STW1=>Mark=>STW2 the long time cal goroutine make the STW1 long time but why the STW2 also need stop the world and the time is little ?? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.