kawansoft / AceQL.Client2

C# Client toolkit for easy access of remote SQL databases managed with AceQL HTTP.
https://www.aceql.com
Apache License 2.0
3 stars 1 forks source link

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

Open swapndeh opened 4 years ago

swapndeh commented 4 years ago

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 commented 4 years ago

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

ndepomereu commented 4 years ago

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 Connectionsrelease: https://github.com/kawansoft/aceql-http/issues/10

In short, make sure you release the server Connectionsinto 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 nnnis 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 commented 4 years ago

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

ndepomereu commented 4 years ago

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

swapndeh commented 4 years ago

Hi,

I have also uploaded file on https://github.com/kawansoft/AceQL.Client/files/5370327/aceql-server.zip

Regards Swapnil

From: Swapnil Dehankar Sent: Tuesday, October 13, 2020 2:50 PM To: 'kawansoft/AceQL.Client' reply@reply.github.com; kawansoft/AceQL.Client AceQL.Client@noreply.github.com Cc: Author author@noreply.github.com Subject: RE: [kawansoft/AceQL.Client] Aceql-database connectivity issue after 5-7 minutes (#15)

Hi,

I have sent file twice. Resending in zip.

[cid:image001.jpg@01D6A170.9C5036C0]

Regards Swapnil

From: Nicolas de Pomereu notifications@github.com<mailto:notifications@github.com> Sent: Tuesday, October 13, 2020 2:43 PM To: kawansoft/AceQL.Client AceQL.Client@noreply.github.com<mailto:AceQL.Client@noreply.github.com> Cc: Swapnil Dehankar swapndeh@amdocs.com<mailto:swapndeh@amdocs.com>; Author author@noreply.github.com<mailto:author@noreply.github.com> Subject: Re: [kawansoft/AceQL.Client] Aceql-database connectivity issue after 5-7 minutes (#15)

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

- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkawansoft%2FAceQL.Client%2Fissues%2F15%23issuecomment-707607493&data=02%7C01%7Cswapndeh%40amdocs.com%7Cdbe3e6017b6f4b71ba8008d86f584f45%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637381772387627661&sdata=z23r5xkKAFGCbxCXB%2FFOvQ5SJ0QcKjY3TuK86by557w%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARK67CJTLMBAIRD6ZPZO2EDSKQK23ANCNFSM4SMVRJIQ&data=02%7C01%7Cswapndeh%40amdocs.com%7Cdbe3e6017b6f4b71ba8008d86f584f45%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637381772387637657&sdata=1MMn3RlmN1WpUQP8mS%2BUkk3a1osdLgPXcHIAhbRVAH4%3D&reserved=0. This email and the information contained herein is proprietary and confidential and subject to the Amdocs Email Terms of Service, which you may review at https://www.amdocs.com/about/email-terms-of-service https://www.amdocs.com/about/email-terms-of-service

ndepomereu commented 4 years ago

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 commented 4 years ago

Hi Nicolas,

await connection.OpenAsync(); -- works fine for every request

await command.ExecuteNonQueryAsync(); -- throw exception after 5-7 minutes irrespective of number of transactions.

Regards Swapnil

From: Nicolas de Pomereu notifications@github.com Sent: Tuesday, October 13, 2020 3:10 PM To: kawansoft/AceQL.Client AceQL.Client@noreply.github.com Cc: Swapnil Dehankar swapndeh@amdocs.com; Author author@noreply.github.com Subject: Re: [kawansoft/AceQL.Client] Aceql-database connectivity issue after 5-7 minutes (#15)

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?

- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkawansoft%2FAceQL.Client%2Fissues%2F15%23issuecomment-707622777&data=02%7C01%7Cswapndeh%40amdocs.com%7Cc530ae6cb84043bf036e08d86f5c230b%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637381788813800921&sdata=olSkXtFbqeUWVV%2BmJGLtNfQvnF31tdTB3Y2Qoe0fdSE%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARK67CIK2SOVLYMUV5XP67TSKQOAZANCNFSM4SMVRJIQ&data=02%7C01%7Cswapndeh%40amdocs.com%7Cc530ae6cb84043bf036e08d86f5c230b%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637381788813800921&sdata=XWQu6vTUAzf6IsZLXmh8xkTs7YE27PpOO9a%2Fm%2F67IEQ%3D&reserved=0. This email and the information contained herein is proprietary and confidential and subject to the Amdocs Email Terms of Service, which you may review at https://www.amdocs.com/about/email-terms-of-service https://www.amdocs.com/about/email-terms-of-service

ndepomereu commented 4 years ago

Hi,

Could you please run the program from getting a new connection to close in a loop with a 10 seconds Sleep between 2 executions?

Nicolas de Pomereu

Le mar. 13 oct. 2020 à 12:06, swapndeh notifications@github.com a écrit :

Hi Nicolas,

await connection.OpenAsync(); -- works fine for every request

await command.ExecuteNonQueryAsync(); -- throw exception after 5-7 minutes irrespective of number of transactions.

Regards Swapnil

From: Nicolas de Pomereu notifications@github.com Sent: Tuesday, October 13, 2020 3:10 PM To: kawansoft/AceQL.Client AceQL.Client@noreply.github.com Cc: Swapnil Dehankar swapndeh@amdocs.com; Author < author@noreply.github.com> Subject: Re: [kawansoft/AceQL.Client] Aceql-database connectivity issue after 5-7 minutes (#15)

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?

- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub< https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkawansoft%2FAceQL.Client%2Fissues%2F15%23issuecomment-707622777&data=02%7C01%7Cswapndeh%40amdocs.com%7Cc530ae6cb84043bf036e08d86f5c230b%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637381788813800921&sdata=olSkXtFbqeUWVV%2BmJGLtNfQvnF31tdTB3Y2Qoe0fdSE%3D&reserved=0>, or unsubscribe< https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARK67CIK2SOVLYMUV5XP67TSKQOAZANCNFSM4SMVRJIQ&data=02%7C01%7Cswapndeh%40amdocs.com%7Cc530ae6cb84043bf036e08d86f5c230b%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637381788813800921&sdata=XWQu6vTUAzf6IsZLXmh8xkTs7YE27PpOO9a%2Fm%2F67IEQ%3D&reserved=0

. This email and the information contained herein is proprietary and confidential and subject to the Amdocs Email Terms of Service, which you may review at https://www.amdocs.com/about/email-terms-of-service < https://www.amdocs.com/about/email-terms-of-service>

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kawansoft/AceQL.Client/issues/15#issuecomment-707636661, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADQ7CVTFYCXAMTBZFE2MFTLSKQRDZANCNFSM4SMVRJIQ .

swapndeh commented 4 years ago

Hi Nicolas,

I have tried as suggested by you but still no luck.

Regards Swapnil

From: Nicolas de Pomereu notifications@github.com Sent: Tuesday, October 13, 2020 4:23 PM To: kawansoft/AceQL.Client AceQL.Client@noreply.github.com Cc: Swapnil Dehankar swapndeh@amdocs.com; Author author@noreply.github.com Subject: Re: [kawansoft/AceQL.Client] Aceql-database connectivity issue after 5-7 minutes (#15)

Hi,

Could you please run the program from getting a new connection to close in a loop with a 10 seconds Sleep between 2 executions?

Nicolas de Pomereu

Le mar. 13 oct. 2020 à 12:06, swapndeh notifications@github.com a écrit :

Hi Nicolas,

await connection.OpenAsync(); -- works fine for every request

await command.ExecuteNonQueryAsync(); -- throw exception after 5-7 minutes irrespective of number of transactions.

Regards Swapnil

From: Nicolas de Pomereu notifications@github.com Sent: Tuesday, October 13, 2020 3:10 PM To: kawansoft/AceQL.Client AceQL.Client@noreply.github.com Cc: Swapnil Dehankar swapndeh@amdocs.com; Author < author@noreply.github.com> Subject: Re: [kawansoft/AceQL.Client] Aceql-database connectivity issue after 5-7 minutes (#15)

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?

- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub< https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkawansoft%2FAceQL.Client%2Fissues%2F15%23issuecomment-707622777&data=02%7C01%7Cswapndeh%40amdocs.com%7Cc530ae6cb84043bf036e08d86f5c230b%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637381788813800921&sdata=olSkXtFbqeUWVV%2BmJGLtNfQvnF31tdTB3Y2Qoe0fdSE%3D&reserved=0>, or unsubscribe< https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARK67CIK2SOVLYMUV5XP67TSKQOAZANCNFSM4SMVRJIQ&data=02%7C01%7Cswapndeh%40amdocs.com%7Cc530ae6cb84043bf036e08d86f5c230b%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637381788813800921&sdata=XWQu6vTUAzf6IsZLXmh8xkTs7YE27PpOO9a%2Fm%2F67IEQ%3D&reserved=0

. This email and the information contained herein is proprietary and confidential and subject to the Amdocs Email Terms of Service, which you may review at https://www.amdocs.com/about/email-terms-of-service < https://www.amdocs.com/about/email-terms-of-service>

- You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kawansoft/AceQL.Client/issues/15#issuecomment-707636661, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADQ7CVTFYCXAMTBZFE2MFTLSKQRDZANCNFSM4SMVRJIQ .

- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkawansoft%2FAceQL.Client%2Fissues%2F15%23issuecomment-707660113&data=02%7C01%7Cswapndeh%40amdocs.com%7C35ad9f1568f0415ab5e608d86f6641ed%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637381832272100397&sdata=BEY06UdwCE9PXVlZUZcYliYN6A9ZWb86Mgzx28g3MLk%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARK67CP5TQ6OPZCQ2RIHVOLSKQWR3ANCNFSM4SMVRJIQ&data=02%7C01%7Cswapndeh%40amdocs.com%7C35ad9f1568f0415ab5e608d86f6641ed%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637381832272100397&sdata=lKIS5KOrrzuXsqCPI%2FNukkuFi5eXNrcpKOTPUVPo0Ic%3D&reserved=0. This email and the information contained herein is proprietary and confidential and subject to the Amdocs Email Terms of Service, which you may review at https://www.amdocs.com/about/email-terms-of-service https://www.amdocs.com/about/email-terms-of-service

ndepomereu commented 4 years ago

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

ndepomereu commented 4 years ago

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

swapndeh commented 4 years ago

Hi Nicolas,

Did you get chance to look into below issue?

Regards Swapnil

From: Nicolas de Pomereu notifications@github.com Sent: Tuesday, October 13, 2020 6:28 PM To: kawansoft/AceQL.Client AceQL.Client@noreply.github.com Cc: Swapnil Dehankar swapndeh@amdocs.com; Author author@noreply.github.com Subject: Re: [kawansoft/AceQL.Client] Aceql-database connectivity issue after 5-7 minutes (#15)

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

- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkawansoft%2FAceQL.Client%2Fissues%2F15%23issuecomment-707720030&data=02%7C01%7Cswapndeh%40amdocs.com%7Cecf0f661293a4b57ef1b08d86f77ae03%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637381907126539551&sdata=%2FDbjW1rEyRLXEnvlr%2F4ykJBnF5S1O%2BR%2BsIyIwtqNpQ4%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARK67CPRICO4CEKUMPQWQHTSKRFEJANCNFSM4SMVRJIQ&data=02%7C01%7Cswapndeh%40amdocs.com%7Cecf0f661293a4b57ef1b08d86f77ae03%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637381907126539551&sdata=gLtM9eY%2FymcmqPRDjgoqXDYvuq3tax84FZjM6atOANg%3D&reserved=0. This email and the information contained herein is proprietary and confidential and subject to the Amdocs Email Terms of Service, which you may review at https://www.amdocs.com/about/email-terms-of-service https://www.amdocs.com/about/email-terms-of-service

ndepomereu commented 4 years ago

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 commented 4 years ago

Hi Nicolas,

We have dockerized AceQl server. To do so we have simply created an image with AceQl properties file, jdk 11 & jdbc-mssql 8.2.2 driver. And running this image from a container, we are accessing it. While dockerization we haven't mentioned any specific configuration.

Regards Swapnil

From: Nicolas de Pomereu notifications@github.com Sent: Thursday, October 15, 2020 2:16 PM To: kawansoft/AceQL.Client AceQL.Client@noreply.github.com Cc: Swapnil Dehankar swapndeh@amdocs.com; Author author@noreply.github.com Subject: Re: [kawansoft/AceQL.Client] Aceql-database connectivity issue after 5-7 minutes (#15)

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.

- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkawansoft%2FAceQL.Client%2Fissues%2F15%23issuecomment-708998778&data=02%7C01%7Cswapndeh%40amdocs.com%7C93c6d38c3d7c4940621e08d870e6e180%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637383484215588053&sdata=wku4Q61CvAIJtHMOBfQ6MaMtloboKbz8HfJlXVwyUnE%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARK67CKLTN6PL2VKESZHN4LSK2ZE5ANCNFSM4SMVRJIQ&data=02%7C01%7Cswapndeh%40amdocs.com%7C93c6d38c3d7c4940621e08d870e6e180%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637383484215588053&sdata=qt03jCwyhDfYemzvXM0OU3RwC8tTKyN6Dp3jREqOuds%3D&reserved=0. This email and the information contained herein is proprietary and confidential and subject to the Amdocs Email Terms of Service, which you may review at https://www.amdocs.com/about/email-terms-of-service https://www.amdocs.com/about/email-terms-of-service

ndepomereu commented 4 years ago

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 commented 4 years ago

Hi Nicolas,

I will check with Docker specialist, thanks for your valuable time and info.

Regards Swapnil

From: Nicolas de Pomereu notifications@github.com Sent: Thursday, October 15, 2020 4:27 PM To: kawansoft/AceQL.Client AceQL.Client@noreply.github.com Cc: Swapnil Dehankar swapndeh@amdocs.com; Author author@noreply.github.com Subject: Re: [kawansoft/AceQL.Client] Aceql-database connectivity issue after 5-7 minutes (#15)

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.

- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkawansoft%2FAceQL.Client%2Fissues%2F15%23issuecomment-709182511&data=02%7C01%7Cswapndeh%40amdocs.com%7C94d2ba06f7d34dc8e03908d870f919cb%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637383562474257083&sdata=v8lVSqW8Bhy%2F4tUMmj%2F%2FvC7U12ikbd8nQUvIK3L%2BaU4%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARK67CLUEYQOX2GE2HLQ2S3SK3IPNANCNFSM4SMVRJIQ&data=02%7C01%7Cswapndeh%40amdocs.com%7C94d2ba06f7d34dc8e03908d870f919cb%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637383562474267078&sdata=RpO6wgLY3CixfeCdkIXczCvcKmbWyr8kl0N9AUJ%2BC3o%3D&reserved=0. This email and the information contained herein is proprietary and confidential and subject to the Amdocs Email Terms of Service, which you may review at https://www.amdocs.com/about/email-terms-of-service https://www.amdocs.com/about/email-terms-of-service