Skip to content

Aurora Support #363

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

Closed
vincepri opened this issue Aug 16, 2015 · 5 comments
Closed

Aurora Support #363

vincepri opened this issue Aug 16, 2015 · 5 comments

Comments

@vincepri
Copy link

Has anyone tested the driver with Aurora? I am asking because I am having trouble with Aurora RDS and executing multiple writes in different goroutines, ~100 writes give tcp i/o errors with 0 Idle Connections, while when IdleConnections > 0 the application hangs forever. Same application works fine under heavier workloads with mysql.

@vincepri
Copy link
Author

Follow up, digging deeper I am having a similar problem I think related to #285

It seems it only happens when I connect to Aurora, the only solution I found is to use db.SetMaxOpenConns(1) and db.SetMaxIdleConns(0) but of course this makes things slower for my write workload.

49 @ 0x326b3 0x2c7fe 0x2bcc0 0x140d1a 0x140d86 0x142aca 0x156514 0x102e6c 0x103571 0x107967 0xa3595 0xa3775 0xaa0a4 0xaf6a8 0xa488f 0x6c2d6 0x6bd4e 0x4808 0xc0f04 0xc2dd1 0x62611
#   0x2bcc0     net.runtime_pollWait+0x60                           /usr/local/Cellar/go/1.5rc1/libexec/src/runtime/netpoll.go:157
#   0x140d1a    net.(*pollDesc).Wait+0x3a                           /usr/local/Cellar/go/1.5rc1/libexec/src/net/fd_poll_runtime.go:73
#   0x140d86    net.(*pollDesc).WaitRead+0x36                           /usr/local/Cellar/go/1.5rc1/libexec/src/net/fd_poll_runtime.go:78
#   0x142aca    net.(*netFD).Read+0x23a                             /usr/local/Cellar/go/1.5rc1/libexec/src/net/fd_unix.go:232
#   0x156514    net.(*conn).Read+0xe4                               /usr/local/Cellar/go/1.5rc1/libexec/src/net/net.go:132
#   0x102e6c    crypto/tls.(*block).readFromUntil+0xcc                      /usr/local/Cellar/go/1.5rc1/libexec/src/crypto/tls/conn.go:455
#   0x103571    crypto/tls.(*Conn).readRecord+0x2d1                     /usr/local/Cellar/go/1.5rc1/libexec/src/crypto/tls/conn.go:540
#   0x107967    crypto/tls.(*Conn).Read+0x167                           /usr/local/Cellar/go/1.5rc1/libexec/src/crypto/tls/conn.go:901
#   0xa3595     github.com/go-sql-driver/mysql.(*buffer).fill+0x2b5             /Users/vincenzo/src/github.com/go-sql-driver/mysql/buffer.go:57
#   0xa3775     github.com/go-sql-driver/mysql.(*buffer).readNext+0x55              /Users/vincenzo/src/github.com/go-sql-driver/mysql/buffer.go:86
#   0xaa0a4     github.com/go-sql-driver/mysql.(*mysqlConn).readPacket+0x84         /Users/vincenzo/src/github.com/go-sql-driver/mysql/packets.go:30
#   0xaf6a8     github.com/go-sql-driver/mysql.(*mysqlStmt).readPrepareResultPacket+0x48    /Users/vincenzo/src/github.com/go-sql-driver/mysql/packets.go:715
#   0xa488f     github.com/go-sql-driver/mysql.(*mysqlConn).Prepare+0x21f           /Users/vincenzo/src/github.com/go-sql-driver/mysql/connection.go:153
#   0x6c2d6     database/sql.(*DB).exec+0x3d6                           /usr/local/Cellar/go/1.5rc1/libexec/src/database/sql/sql.go:932
#   0x6bd4e     database/sql.(*DB).Exec+0xbe                            /usr/local/Cellar/go/1.5rc1/libexec/src/database/sql/sql.go:895
#   0x4808      main.(*Connector).Store+0xc58       

@vincepri
Copy link
Author

From some other tests, it seems the problem occurs only with TLS enabled. I am not sure if the problem is now in Aurora itself or not. Need more investigation.

@roustem
Copy link

roustem commented Aug 22, 2015

I have a similar issue with Aurora where my transactions freeze when trying to commit. It goes away if we disable TLS.

@vincepri
Copy link
Author

Yeah. Same here, but disabling TLS is a non solution. :/

@julienschmidt
Copy link
Member

TLS in the MySQL protocol is quite simple: Server says "Hi, I support TLS", the client then answers "cool, everything from now on is TLS encrypted then!" and switches to TLS then [0]. All other protocol is transparent. Unless the Go TLS implementation is incompatible for some reason, I have little idea what could go wrong there.
Moreover I don't have an Aurora instance for debugging. If you can find the cause, I'm happy to fix it.

0: http://dev.mysql.com/doc/internals/en/ssl.html

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

3 participants