[Firebird-net-provider] RES: RES: Error reading data from the connection

2015-01-27 Thread Nicolas F. Timmers
I think probably the application pool is not running again for this case see
I have.

A customer connected early on the database but is not used more for the day
and the next morning the error occurred and that the firebird was only
stopped night, I believe that the application pool is being never finalized.

-Mensagem original-
De: Luciano Mendes [mailto:luronu...@gmail.com] 
Enviada em: segunda-feira, 26 de janeiro de 2015 11:32
Para: firebird-net-provider@lists.sourceforge.net
Assunto: Re: [Firebird-net-provider] RES: Error reading data from the
connection

Let me copy, once again, the source code of the SW that is not work. Note
the I am always open the Polling connection according the documentation (
https://msdn.microsoft.com/en-us/library/8xx3tyca(v=vs.100).aspx ) and it
was broken since the version 4.6.0.0:

===
using FirebirdSql.Data.FirebirdClient; 

public static bool ExecuteCommand(string DML) 
{ 
using (FbConnection fbConnection = new
FbConnection(connectionString())) 
using (FbCommand fbCommand = new FbCommand(DML, fbConnection)) 
try 
{ 
Cursor.Current = Cursors.WaitCursor; 
fbCommand.Connection.Open(); 
fbCommand.ExecuteNonQuery(); 
return true; 
} 
catch (FbException ex) 
{ 
return false; 
} 
finally 
{ 
Cursor.Current = Cursors.Default; 
} 
} 



--
View this message in context:
http://firebird.1100200.n4.nabble.com/Error-reading-data-from-the-connection
-tp4638893p4638932.html
Sent from the firebird-net-provider mailing list archive at Nabble.com.


--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] RES: RES: Error reading data from the connection

2015-01-27 Thread Gerdus van Zyl
What is the values on your connection string for
ConnectionLifeTime
and
MinPoolSize
?

On Tue, Jan 27, 2015 at 1:57 PM, Nicolas F. Timmers nftimm...@hotmail.com
wrote:

 I think probably the application pool is not running again for this case
 see
 I have.

 A customer connected early on the database but is not used more for the day
 and the next morning the error occurred and that the firebird was only
 stopped night, I believe that the application pool is being never
 finalized.

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] RES: Error reading data from the connection

2015-01-27 Thread Michał Ziemski
Maybe a better approach would be to catch the exception when writing to a
socket and in that case flush the pool?
Polling on every connection every 2 secs is a major overhead (especially
for server uses with many connections to multiple databases).

Cheers!
Michał

2015-01-27 12:56 GMT+01:00 Gerdus van Zyl gerdusvan...@gmail.com:

 The msdn docs do state: The connection pooler removes a connection from
 the pool after it has been idle for a long time, *or if the pooler
 detects that the connection with the server has been severed*.
 So other database providers probably check periodically for broken
 connections.

 however the docs also say If a connection exists to a server that has
 disappeared, this connection can be drawn from the pool *even if the
 connection pooler has not detected the severed connection and marked it as
 invalid. *This is the case because the overhead of checking that the
 connection is still valid would eliminate the benefits of having a pooler
 by causing another round trip to the server to occur. *When this occurs,
 the first attempt to use the connection will detect that the connection has
 been severed, and an exception is thrown.*

 See attached patch(+ test program) that adds a connection check on idle
 connections in the connection pool cleanup code that is run every 2 seconds
 to remove old connections.
 Even with the patch if the server goes away between checks you can still
 get a broken connection as is the case with other database providers.

 This does cause a small network request for each idle connection in the
 pool every 2 seconds so don't know if this patch would be suitable for
 public use.

 On Mon, Jan 26, 2015 at 3:32 PM, Luciano Mendes luronu...@gmail.com
 wrote:

 Let me copy, once again, the source code of the SW that is not work. Note
 the
 I am always open the Polling connection according the documentation (
 https://msdn.microsoft.com/en-us/library/8xx3tyca(v=vs.100).aspx ) and it
 was broken since the version 4.6.0.0:

 ===
 using FirebirdSql.Data.FirebirdClient;

 public static bool ExecuteCommand(string DML)
 {
 using (FbConnection fbConnection = new
 FbConnection(connectionString()))
 using (FbCommand fbCommand = new FbCommand(DML, fbConnection))
 try
 {
 Cursor.Current = Cursors.WaitCursor;
 fbCommand.Connection.Open();
 fbCommand.ExecuteNonQuery();
 return true;
 }
 catch (FbException ex)
 {
 return false;
 }
 finally
 {
 Cursor.Current = Cursors.Default;
 }
 }



 --
 View this message in context:
 http://firebird.1100200.n4.nabble.com/Error-reading-data-from-the-connection-tp4638893p4638932.html
 Sent from the firebird-net-provider mailing list archive at Nabble.com.


 --
 Dive into the World of Parallel Programming. The Go Parallel Website,
 sponsored by Intel and developed in partnership with Slashdot Media, is
 your
 hub for all things parallel software development, from weekly thought
 leadership blogs to news, videos, case studies, tutorials and more. Take a
 look and join the conversation now. http://goparallel.sourceforge.net/
 ___
 Firebird-net-provider mailing list
 Firebird-net-provider@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/firebird-net-provider




 --
 
 Gerdus van Zyl
 www.infireal.com


 --
 Dive into the World of Parallel Programming. The Go Parallel Website,
 sponsored by Intel and developed in partnership with Slashdot Media, is
 your
 hub for all things parallel software development, from weekly thought
 leadership blogs to news, videos, case studies, tutorials and more. Take a
 look and join the conversation now. http://goparallel.sourceforge.net/
 ___
 Firebird-net-provider mailing list
 Firebird-net-provider@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net

[Firebird-net-provider] RES: RES: RES: Error reading data from the connection

2015-01-27 Thread Nicolas F. Timmers
I do not modify these values even inform them in the connection string, I'm 
wondering because he is giving this error even after hours after the User no 
longer used

 

De: Gerdus van Zyl [mailto:gerdusvan...@gmail.com] 
Enviada em: terça-feira, 27 de janeiro de 2015 10:04
Para: For users and developers of the Firebird .NET providers
Assunto: Re: [Firebird-net-provider] RES: RES: Error reading data from the 
connection

 

What is the values on your connection string for 
ConnectionLifeTime

and
MinPoolSize
?

 

On Tue, Jan 27, 2015 at 1:57 PM, Nicolas F. Timmers nftimm...@hotmail.com 
mailto:nftimm...@hotmail.com  wrote:

I think probably the application pool is not running again for this case see
I have.

A customer connected early on the database but is not used more for the day
and the next morning the error occurred and that the firebird was only
stopped night, I believe that the application pool is being never finalized.

 

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] RES: RES: RES: Error reading data from the connection

2015-01-27 Thread Gerdus van Zyl
The default for ConnectionLifeTime is 0 and thus connections are never
released/closed if pooling is enabled.
Try setting ConnectionLifeTime to 60 (is in seconds) and you might get
results more inline with what you expect.

On Tue, Jan 27, 2015 at 2:42 PM, Nicolas F. Timmers nftimm...@hotmail.com
wrote:

 I do not modify these values even inform them in the connection string,
 I'm wondering because he is giving this error even after hours after the
 User no longer used



 *De:* Gerdus van Zyl [mailto:gerdusvan...@gmail.com]
 *Enviada em:* terça-feira, 27 de janeiro de 2015 10:04
 *Para:* For users and developers of the Firebird .NET providers
 *Assunto:* Re: [Firebird-net-provider] RES: RES: Error reading data from
 the connection



 What is the values on your connection string for
 ConnectionLifeTime

 and
 MinPoolSize
 ?



 On Tue, Jan 27, 2015 at 1:57 PM, Nicolas F. Timmers nftimm...@hotmail.com
 wrote:

 I think probably the application pool is not running again for this case
 see
 I have.

 A customer connected early on the database but is not used more for the day
 and the next morning the error occurred and that the firebird was only
 stopped night, I believe that the application pool is being never
 finalized.




 --
 Dive into the World of Parallel Programming. The Go Parallel Website,
 sponsored by Intel and developed in partnership with Slashdot Media, is
 your
 hub for all things parallel software development, from weekly thought
 leadership blogs to news, videos, case studies, tutorials and more. Take a
 look and join the conversation now. http://goparallel.sourceforge.net/
 ___
 Firebird-net-provider mailing list
 Firebird-net-provider@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/firebird-net-provider




-- 

Gerdus van Zyl
www.infireal.com
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


[Firebird-net-provider] RES: RES: RES: RES: Error reading data from the connection

2015-01-27 Thread Nicolas F. Timmers
Got'it, tanks :)

 

De: Gerdus van Zyl [mailto:gerdusvan...@gmail.com] 
Enviada em: terça-feira, 27 de janeiro de 2015 11:12
Para: For users and developers of the Firebird .NET providers
Assunto: Re: [Firebird-net-provider] RES: RES: RES: Error reading data from the 
connection

 

The default for ConnectionLifeTime is 0 and thus connections are never 
released/closed if pooling is enabled. 

Try setting ConnectionLifeTime to 60 (is in seconds) and you might get results 
more inline with what you expect.

 

On Tue, Jan 27, 2015 at 2:42 PM, Nicolas F. Timmers nftimm...@hotmail.com 
mailto:nftimm...@hotmail.com  wrote:

I do not modify these values even inform them in the connection string, I'm 
wondering because he is giving this error even after hours after the User no 
longer used

 

De: Gerdus van Zyl [mailto:gerdusvan...@gmail.com 
mailto:gerdusvan...@gmail.com ] 
Enviada em: terça-feira, 27 de janeiro de 2015 10:04
Para: For users and developers of the Firebird .NET providers
Assunto: Re: [Firebird-net-provider] RES: RES: Error reading data from the 
connection

 

What is the values on your connection string for 
ConnectionLifeTime

and
MinPoolSize
?

 

On Tue, Jan 27, 2015 at 1:57 PM, Nicolas F. Timmers nftimm...@hotmail.com 
mailto:nftimm...@hotmail.com  wrote:

I think probably the application pool is not running again for this case see
I have.

A customer connected early on the database but is not used more for the day
and the next morning the error occurred and that the firebird was only
stopped night, I believe that the application pool is being never finalized.

 


--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net 
mailto:Firebird-net-provider@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider




-- 


Gerdus van Zyl

www.infireal.com http://www.infireal.com 

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


[Firebird-net-provider] Decorators for FbConnectionString properties

2015-01-27 Thread Hernan Martinez
Hi dev(s)!

One nice addition would be to decorate FbConnectionString public properties 
with Attribute decorators like Category, Description, Editor, DefaultValue, etc.
It’s a fairly easy mod (if only with English texts) and I can do it by myself. 
Would you accept patches? Do you expect any problem with regards to Mono?

Regards,

Hernán Martínez-Foffani
_ 
OBI - on board intelligence
Director de Tecnología
hernan.marti...@obi-corp.com mailto:hernan.marti...@obi-corp.com
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Decorators for FbConnectionString properties

2015-01-27 Thread Jiří Činčura
Sure. Go ahead. Once done create PR on GitHub and that’s it.

--
Mgr. Jiří Činčura
Independent IT Specialist

From: Hernan Martinez [mailto:hernan.marti...@obi-corp.com]
Sent: Tuesday, January 27, 2015 5:06 PM
To: Firebird-net-provider@lists.sourceforge.net
Subject: [Firebird-net-provider] Decorators for FbConnectionString properties

Hi dev(s)!

One nice addition would be to decorate FbConnectionString public properties 
with Attribute decorators like Category, Description, Editor, DefaultValue, etc.
It’s a fairly easy mod (if only with English texts) and I can do it by myself. 
Would you accept patches? Do you expect any problem with regards to Mono?

Regards,

Hernán Martínez-Foffani
_
OBI - on board intelligence
Director de Tecnología
hernan.marti...@obi-corp.commailto:hernan.marti...@obi-corp.com

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider