admin管理员组

文章数量:1399898

I have an old application in C# in postgresql 9.3 using this code to connect to server.

  • FluentMigrator : 1.6.2
  • NHibernate : 4.1.2
  • Npgsql : 2.2.7
Configuration configuration = new Configuration();
configuration.SessionFactoryName("BuildIt");
configuration.SetNamingStrategy(new PostgreSQLNamingStrategy());

configuration.DataBaseIntegration(db =>
            {
                db.Dialect<PostgreSQLDialect>();
                db.Driver<NpgsqlDriver>();

                db.KeywordsAutoImport = Hbm2DDLKeyWords.AutoQuote;
                db.IsolationLevel = IsolationLevel.ReadCommitted;
                db.ConnectionString = this.connectionString;

                db.Timeout = 1;
                db.BatchSize = 1000;

                db.LogFormattedSql = false;
                db.LogSqlInConsole = false;

                db.AutoCommentSql = false;
            });

In this version, a timeout is raised after a delay of 1 second (as expected)

I've migrated all the project with version 16.8 of postgresql and last version of nugets.
The Nhibernate.configuration step is still working, no modification was needed.

BUT the timeout property is not working anymore and seems to be infinite now.

Have anyone encountered a similar issue?

Trying to set the "command_timeout" in connectionstring, NHibernate.Environment have no effect.
Trying to set timeout directly in Criteria of QueryOver has no effect.

本文标签: cProperty Timeout in NHibernate configuration is not working anymoreStack Overflow