MySQL Connector .NET 1.0.6 and "Connection unexpectedly terminated" exception

Ask a Question related to MySQL, Design and Development.

  1. #1

    Default MySQL Connector .NET 1.0.6 and "Connection unexpectedly terminated" exception

    Dear newsgroup,

    I'm having a critical problem with the MySQL Connector .NET 1.0.6. I'm
    developing a .NET (Version 1.1 SP1) application on a Windows 2000
    Professional machine with MySQL Server 4.1.14.

    A huge SQL query does run for about 40 minutes but then aborts with the
    exception "Connection unexpectedly terminated". If I comment out some time
    and memory consuming calculations the query does run a bit further but then
    also terminates. It seems like there is a relation between the memory used
    by my application (which constantly grows while it's running) and this
    problem. I am using a MySqlReader to fetch the results row by row. I found
    out that if I am using a "classical" MySqlQuery, apply a LIMIT on the SQL
    and call it several times (with different LIMITs of course), the problem
    does not occur BUT this is certainly not as high-performance as using a
    MySqlReader.

    The bug is registered in the MySQL bug tracking system
    ([url]http://bugs.mysql.com/bug.php?id=6688[/url]) since 17th November of last year
    (!) and there has been no fix.

    I also tried MySQL Server 4.1.15 and 5.0.15 -> same problem.

    I wonder if anyone came across this problem and found a resolution?

    --
    Sincerely
    Sven Jacobs
    Sven Jacobs Guest

  2. Similar Questions and Discussions

    1. How to find out if mysql connection is "healthy"?
      That's about the C api. I have a need to find out if a mysql connection is healthy or not, that is, is the server still up and able to serve...
    2. Distiller PDF gives "pstopdffilter" terminated on signal 11
      Distiller PDF gives "pstopdffilter" terminated on signal 11 AFter using this sucessfully, I am now met at every turn with this abnd it wont print...
    3. php mysql connection "unidentified error"
      windows xp pro SP2, IIS 5, MySQL 4.1, PHP 5, DWMX 04, I am new to Mysql and php, i've used asp in the past. I am trying to setup an application...
    4. #25620 [Opn->WFx]: Crash / "String is not zero-terminated"
      ID: 25620 Updated by: sniper@php.net Reported By: xris at farcaster dot net -Status: Open +Status: ...
    5. #25620 [Fbk]: Crash / "String is not zero-terminated"
      ID: 25620 Updated by: sniper@php.net Reported By: xris at farcaster dot net Status: Feedback Bug Type: ...
  3. #2

    Default Re: MySQL Connector .NET 1.0.6 and "Connection unexpectedly terminated" exception

    > I'm having a critical problem with the MySQL Connector .NET 1.0.6. I'm
    > developing a .NET (Version 1.1 SP1) application on a Windows 2000
    > Professional machine with MySQL Server 4.1.14.
    >
    > [...]
    I think I found the cause and solution to this problem! I was able to
    reproduce this bug with the following small piece of C# code:

    try
    {
    // Edit connection settings here!
    MySqlConnection conn = new MySqlConnection( "server=localhost;user
    id=xxx;password=yyy;database=zzz;port=3306" );
    conn.Open();

    // Do a SELECT on a table with many rows here!
    MySqlCommand cmd = new MySqlCommand( "SELECT * FROM xyz LIMIT 1000", conn
    );
    MySqlDataReader reader = cmd.ExecuteReader();

    while ( reader.Read() )
    {
    // Let's sleep for a moment. Important for reproducing the bug!
    Thread.Sleep( 2400 );
    }

    MessageBox.Show( this, "Done" );
    }
    catch( Exception ex )
    {
    MessageBox.Show( this, ex.Message, "Exception!", MessageBoxButtons.OK,
    MessageBoxIcon.Error );
    }

    Since the bug seems to be strongly connected to some timeout, I've tried to
    manipulate several server variables which are related to timeout settings.
    I found out that if the value of the variable net_write_timeout is
    increased to 3600 (previously 60) the error does not occur!

    For further details please see bug report at
    [url]http://bugs.mysql.com/bug.php?id=6688[/url]

    --
    Sincerely
    Sven Jacobs
    Sven Jacobs Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139