0

Is there a way to set the net_write_timeout when using AsyncPoco?

I am getting a premature end of stream error from MySQL when using AsynchPoco processing a large recordset.

The issue is described in here - http://bugs.mysql.com/bug.php?id=57365

Another direct example is here - MySQL Exception - Fatal Error Encountered During Data Read

Here is my code.

List<T> list = new List<T>();
var db = new AsyncPoco.Database(this.ConnectionString, this.ProvideName);
db.CommandTimeout = 2000;

db.QueryAsync<T>(sql, a =>
{
    list.Add(a);
}).Wait();
Community
  • 1
  • 1

1 Answers1

0

Have you tried:

await db.ExecuteAsync("set net_write_timeout = 31536000");
Todd Menier
  • 37,557
  • 17
  • 150
  • 173