Skip to content
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

DB Connection Stuck during Login #22

Open
shou1dwe opened this issue Oct 21, 2020 · 4 comments
Open

DB Connection Stuck during Login #22

shou1dwe opened this issue Oct 21, 2020 · 4 comments

Comments

@shou1dwe
Copy link

shou1dwe commented Oct 21, 2020

We have an application that occasionally stuck and the stack trace shows that it goes into this branch and eventually at stuck at a network read in go runtime code.
https://github.com/thda/tds/blob/master/buffer.go#L202

May I know the intention of this readPkt call after EOF encountered?

We don't have any timeout params set as part of the conn string, so from the code, it looks like it is going to take defaultLoginTimeout = 20, which is in seconds. but it doesn't look like this timeout is kicking in for us either. The process is stuck for at least 2 hours - very likely at the exact same place.

From our investigation, we can see from the host netstat output that the connection is in ESTABLISHED state and from the Sybase Text Report that the DB server agrees with that.

I will try to post the stack trace, but it is a bit challenging to get it out from firm network. It is essentially coming from newSession(...) in session.go, then login(...), then initState(...)

@thda
Copy link
Owner

thda commented Oct 30, 2020

Hi,

thanks for reporting.
May I know the server version and the version of this driver you are using ?
I've fixed an issue like that recently, could you make sure you are using master ?
If it's not fixed on master I'll work on adding debug information.

@shou1dwe
Copy link
Author

shou1dwe commented Oct 30, 2020 via email

@thda
Copy link
Owner

thda commented Oct 30, 2020

commit f49ccc1 was the last change of the login procedure to handle ASE 16 password.
I think I still should find a better way to respect login timeout.
I'll try to handle it more gracefully.

@shou1dwe
Copy link
Author

Thanks for your help! btw the server is ASE 15.7. Anything more specific you want to know?

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

2 participants