getsockopt:连接超时

I rewrite my project from python tornado to go(use iris framework). The basic function tested ok. When I test under high concurrence.the app always stops a while and then comes out the errors:

(dial tcp 192.168.1.229:6543: getsockopt: connection timed out)

the 6543 port is the postgresql port used with pgbouncer...the pgbouncer and postgresl process runs Ok.

Also, I find that the memcache connect time out sometimes(the memcache process is still working).

Does this happen because too many connections? Or some connections not closed on time? How can I avoid this problem?

Check your PgBouncer config. Try to increase max_client_conn option. Then experiment with concurrency level and requests count during stress test. Another possible issue can be that you don't return connections to pool.