List:MySQL and .NET« Previous MessageNext Message »
From:SGreen Date:April 12 2005 8:41pm
Subject:Re: Chasing a problem with an exception "Unable to write data to the
transport connection"
View as plain text  
The fact that it crashes using TWO DIFFERENT connection libraries seems to 
imply that your problems are more in the design of your application and 
not with your choice of db connectivity library. Are you bleeding memory? 
exhausting the stack? opening too many connections? ...?

I would strongly suggest that you review your design again and make sure 
that you only open as many connections as you need and close (and release) 
them as soon as you are done (or return them to a pool). Reuse connections 
as often as possible as creating and destroying them are "costly" (lots of 
network traffic required to set one up) and each connection consumes some 
rather valuable resources (threads, ports, etc).  Maybe you need to store 
those variables in the heap and not on the stack. Maybe you need to update 
your TCP/IP drivers. Maybe.... (there are hundreds of possibilities).

However, it does sound more like a resource consumption issue within your 
code and not necessarily with either of the MySQL connectivity libraries.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine


Guy Platt <guy.platt@stripped> wrote on 04/12/2005 10:29:37 AM:

> I wondered whether you managed to solve this? If so, could you share 
> with us what you did?
> 
> I have a program which processes all transaction in a table, then sleeps 

> for a period before trying again. This program always crashed with the 
> error you describe after it had processed around a 100 or so records. 
> This was with the Connector/Net 1.0.4. I changed to using the ODBC 3.51 
> driver and now it can handle several hundred (or even a thousand) 
> records before crashing. Problem is that I need it to handle 10 000 
records.
> 
> Any ideas on how to track down what might be causing this?  I have tried 

> running it both against a local server and a remote one, both are MySql 
> 4.0.17
> Not wanting to start any flames, but I think that the ODBC is still 
> quite a bit faster than the 1.0.4 Connector/Net to handle 1 read from 
> the table then 2 table inserts and 5 table updates.
> 
> many thanks
>   Guy
> 
> James Moore said the following wise words on 2005-02-13 19:43:
> 
> >Been chasing this for a while with no success, so I thought I'd see if
> >anyone has any thoughts.  Next thing on my list is to try it using an 
ODBC
> >connector.
> >
> >Connector 1.0.4 talking to 4.1.9 server; server is running on a redhat 
7.3
> >box.  Haven't installed 4.1.X server on the windows side, but was 
seeing the
> >same issue when talking to a 4.0.21 server running on the same machine 
as
> >the .Net app.
> >
> >My application runs fine for an hour or so, happily reading and writing 
to
> >the database, until I finally get a System.IO.IOException. 
> > 
> >
> 
> -- 
> MySQL on .NET Mailing List
> For list archives: http://lists.mysql.com/dotnet
> To unsubscribe:    http://lists.mysql.com/dotnet?unsub=1
Thread
Date casting problemKevin Turner13 Feb
  • RE: Date casting problemJordan Sparks13 Feb
RE: Date casting problemKevin Turner13 Feb
  • RE: Date casting problemJordan Sparks13 Feb
    • Re: Date casting problemBen Reichelt13 Feb
RE: Date casting problemKevin Turner13 Feb
  • RE: Date casting problemJames Moore13 Feb
    • RE: Date casting problemReggie Burnett23 Feb
  • Chasing a problem with an exception "Unable to write data to the transport connection"James Moore13 Feb
    • Re: Chasing a problem with an exception "Unable to write data to the transport connection"Jorge Bastos13 Feb
    • Re: Chasing a problem with an exception "Unable to write data tothe transport connection"Guy Platt12 Apr
      • Re: Chasing a problem with an exception "Unable to write data tothe transport connection"Guy Platt12 Apr
      • Re: Chasing a problem with an exception "Unable to write data to thetransport connection"SGreen12 Apr