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

Aceql-database connectivity issue after 5-7 minutes #4

Open
swapndeh opened this issue Oct 12, 2020 · 16 comments
Open

Aceql-database connectivity issue after 5-7 minutes #4

swapndeh opened this issue Oct 12, 2020 · 16 comments

Comments

@swapndeh
Copy link

Hi,

I have dockerized aceql server and trying to connect to sql database from it. It is getting connected to sql database but after every 5-7 minutes, i am getting error while executing sql statements as 'Broken pipe (Write failed)'. Could you please suggest?

Please note aceql serve remains up & running and i am able to open connection as well.

Regards
Swapnil

@ndepomereu
Copy link
Member

Hi Swapnil,
Can you please be more specific and give me the full error, with the stack trace?
Thanks,
Nicolas

@ndepomereu
Copy link
Member

Hi Swapnil,
This seems not related to a technical problem/defect, but to a configuration problem.

Please read this thread in order to be sure how to config the Connections release:
kawansoft/aceql-http#10

In short, make sure you release the server Connections into the Pool by calling AceQLConnection.CloseAsync() at the end of each C# client user session, otherwise your pool will be quickly exhausted.

If you want your connections to be closed automatically, then use:

yourdbname.removeAbandoned=true
yourdbname.removeAbandonedTimeout=nnn

where nnn is the number of seconds your connection will remain open for the client side.

In you case, when I read your error "the connection is closed". it seems that your connections are closed automatically too soon using this feature.

Don't hesitate to share part of your C# code and or server aceql-server.properties config if you need further help.

@ndepomereu
Copy link
Member

Hi Swapnil,
Can please you send me your aceql-server.properties file ?

@ndepomereu
Copy link
Member

I don't understand, I see no file in your message?

@swapndeh
Copy link
Author

swapndeh commented Oct 13, 2020 via email

@ndepomereu
Copy link
Member

ndepomereu commented Oct 13, 2020

Thanks Swapnil.
I don' see the green and yellow colors in your samples.
Can you please tell me what part of code is OK, and what part of code does not work?

@swapndeh
Copy link
Author

swapndeh commented Oct 13, 2020 via email

@ndepomereu
Copy link
Member

ndepomereu commented Oct 13, 2020 via email

@swapndeh
Copy link
Author

swapndeh commented Oct 13, 2020 via email

@ndepomereu
Copy link
Member

Hi Swapnil,
Please send me the full piece of C# code sample, so that I can check something.

@ndepomereu
Copy link
Member

Thanks, I will check and come back to you later.

@swapndeh
Copy link
Author

swapndeh commented Oct 15, 2020 via email

@ndepomereu
Copy link
Member

Hi Swapnil,

We never met this problem with our AceQ usersL, after explaining how to config aceql-server.properties fle.

So,, this is probably (99,99%) only a Docker issue.

I suspect somehow either :

  1. That the MS SQL Server or AceQL server is reinitialized, then all connections are closed, and you get the message on client side when trying to make a request.

  2. The client calls are not made on the same Docker instance that holds the AceQL Server , and when switching target from client side, the existing connection can not be found.

Please desribe preciselely the Docker architecture you use so that we can investigate more about the problem ans ask for Docker usage help.

@swapndeh
Copy link
Author

swapndeh commented Oct 15, 2020 via email

@ndepomereu
Copy link
Member

Hi Swapnil,
I don't know where the problem comes from, as I'm not a Docker specialist.
Something is reset automatically in the Docker image. Or there a is problem between the Docker image and the link to the SQL Server Database.
I would suggest you require help on Stack Overflow about how a JDBC Pool in a Docker image could be reset when linked to a SQL Server database.
I have started to look ,and there are numerous threads on this kind of problems, or related problems.

@swapndeh
Copy link
Author

swapndeh commented Oct 15, 2020 via email

@ndepomereu ndepomereu transferred this issue from kawansoft/AceQL.Client Nov 14, 2020
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