Skip to content

An established connection was aborted after serveral INSERTS #32

@juniormayhe

Description

@juniormayhe

I am having some errors when executing INSERT INTO several times (10 rounds of 10000):

  1. NuoDb.Data.Client.NuoDbSqlException:

1.1. InnerException of NuoDbSqlException:

IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine.

1.1.1. InnerException of IOException:

SocketException: An established connection was aborted by the software in your host machine

Code:

using(var connection = new NuoDbConnection("Server=localhost;Database=MyDatabase;User=sa;Password=mypass;Schema=HOCKEY")) {
    connection.Open();
    foreach(var item in dictionary) {
        new NuoDbCommand($ "INSERT INTO Employee (Id, Name, ProjectId) VALUES ({item.Key}, '{item.Value.Name}', {item.Value.ProjectId})", connection).ExecuteNonQuery();
    }
    connection.Close(); //made no difference
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions