Re: [go-nuts] Re: golang sql driver: bad connection

2016-07-08 Thread Konstantin Khomoutov
On Fri, 8 Jul 2016 11:34:53 -0700 (PDT) Raj wrote: > > > Initially the program giving err driver: bad connection for > > > rows.Err (). So I added panic with that error to get the stack > > > trace. > > > > That's very unfortunate as it works right against the debugging by > > leading whoever r

Re: [go-nuts] Re: golang sql driver: bad connection

2016-07-08 Thread Raj
On Friday, July 8, 2016 at 11:16:50 PM UTC+5:30, Konstantin Khomoutov wrote: > > On Fri, 8 Jul 2016 08:15:27 -0700 (PDT) > Raj > wrote: > > > Initially the program giving err driver: bad connection for rows.Err > > (). So I added panic with that error to get the stack trace. > > That's very u

Re: [go-nuts] Re: golang sql driver: bad connection

2016-07-08 Thread Konstantin Khomoutov
On Fri, 8 Jul 2016 08:15:27 -0700 (PDT) Raj wrote: > Initially the program giving err driver: bad connection for rows.Err > (). So I added panic with that error to get the stack trace. That's very unfortunate as it works right against the debugging by leading whoever reads your problem statement

Re: [go-nuts] Re: golang sql driver: bad connection

2016-07-08 Thread Raj
Hi Ian, Initially the program giving err driver: bad connection for rows.Err(). So I added panic with that error to get the stack trace. for rows.Next() { //stats calculation } if err := rows.Err(); err != nil { panic(err) *// this is line 498* } rows.Close() How can find out the re

Re: [go-nuts] Re: golang sql driver: bad connection

2016-07-08 Thread Ian Lance Taylor
On Fri, Jul 8, 2016 at 7:50 AM, Raj wrote: > By the way I am using go1.7 beta2. Same error was appearing with go1.6 also. > > What does those 8 minutes mean in stack trace? Those annotations mean that those goroutines have been sitting around waiting for something to happen for 8 minutes. The st

[go-nuts] Re: golang sql driver: bad connection

2016-07-08 Thread Raj
By the way I am using go1.7 beta2. Same error was appearing with go1.6 also. What does those 8 minutes mean in stack trace? On Friday, July 8, 2016 at 8:13:26 PM UTC+5:30, Raj wrote: > > Hi, > > My program which has 10 user gourotines to read tables from a database and > generates some stats. I