Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lgcrA-0004Ex-W5 for pgsql-odbc@arkaria.postgresql.org; Wed, 12 May 2021 00:36:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lgcr9-0001fI-Uh for pgsql-odbc@arkaria.postgresql.org; Wed, 12 May 2021 00:36:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lgcr9-0001fA-Nx for pgsql-odbc@lists.postgresql.org; Wed, 12 May 2021 00:36:07 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lgcr5-0002Ox-S2 for pgsql-odbc@lists.postgresql.org; Wed, 12 May 2021 00:36:07 +0000 Received: by mail-ed1-x532.google.com with SMTP id r11so962980edt.13 for ; Tue, 11 May 2021 17:36:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b6TLCFIAdAr2JdU+BvGKFDz9B2VEUgGEO5zFAxoLV/0=; b=AtV5off5NmclU23EROu7j3N8cqQ2aCyLaaaDpHOprSNCGIUZKDsR/b+YNWT8UyF3g3 VWcQBCKuPCqE30MBl6xZCV3VAUgnrZIu0llhZTG6ZQpIlGNH33efpyVjefB83cY+TXMF k4oZeK46aklhAX2clZubvH5jFujPEYJjRVrlLNTCZJyWWG+PY44nvHiqExiwEX+nzG1Y HdfPkpVLSyXUWMjzXfgo7c/FYYS7dQm9jjUq5WNdPBrSdIvuG9m1XyaKXPtFlfe+2x5T I/t3K58l+CvXwWFbQskCb0blVucfhRGj5hycETlWbpdW7/UJ8sOb0SIzgEN+nDTE5hQv 552Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b6TLCFIAdAr2JdU+BvGKFDz9B2VEUgGEO5zFAxoLV/0=; b=HmF01UGEJUA0lKii1JWjijAhYIDMuzOTi/MrwriOzua7AKDqWjABPmCp4zN43j4/EP la6nRHUqbom7Qb4ZTfykVKco4fao7/lOUi3bIDTuqjXSZY8m4a2NRtOocjJ1y/kEURGD R05uxg4v2QDiFQr2o3JwzONwJGNAr9D2hKyIhhgKF9kPV5QQDfXGC+l/0gsRgEV5PlMl Hm8S3YXn1RLqaga1DIbEdtjOxfFEbBUt2yyLyAJNQK82WmnfxaHqjMIXX4643+X1mVKK CPUXR4lq2f6Y9y8gtqHZG5GuuQU9RqZ0IbrVKzfGb3aRK09MzGuxyzHJheOpgiS9HHDI nlEA== X-Gm-Message-State: AOAM533PpexPRjSqXwREChlkWpObZKOFhzGyAo8HlaugfF7SYWqYFcWb cCkr0DzZTdG/DBm865wOl6Gf/Jf05oHn4JA+2bk= X-Google-Smtp-Source: ABdhPJzW+8SrhdOWjRAgLtW8MtFvDVgHQLJFTeM+7yiabgOQg9wwe9i2CnMoIYUy92rkMi6nsgqJoG8Lan84yHfL7K8= X-Received: by 2002:a05:6402:204c:: with SMTP id bc12mr39299969edb.35.1620779762846; Tue, 11 May 2021 17:36:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Inoue,Hiroshi" Date: Wed, 12 May 2021 09:35:50 +0900 Message-ID: Subject: Re: ODBC Calling Fill - Unexptected closed connection after 2 hours To: David Parenteau Cc: "pgsql-odbc@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000060ea805c2173268" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000060ea805c2173268 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi David, How about increasing the CommandTimeout(default 30sec)? $cmd.CommandTimeout =3D 300, for example. regards, Hiroshi Inoue 2021=E5=B9=B45=E6=9C=8811=E6=97=A5(=E7=81=AB) 6:14 David Parenteau : > Using PostgreSQL 12.3 (Ubuntu 12.3-1.pgdg18.04+1) on x86_64-pc-linux-gnu, > compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit > I use driver PostgresSQL Unicode(x64) version 13.00.00.00 > > > I have a query that is executed through an ODBC connection in a Powershel= l > 5.1 script. I use the Fill() method to retreive about 3500 records daily. > When the script works, it takes 2-5 minutes to execute and retrieve data. > Probleme is that the script "fails" half of the time approx. When this > occurs, the powershell script does stop only after 2h and 30 seconds. > We double checked the postgres logs and when this occurs, we see that the > query successfully completed within 6 minutes always. I don't know what = to > look for. any Idea? > > Below is the error got: > > Executed as user: NT Service\SQLSERVERAGENT. A job step received an error > at line 94 in a PowerShell script. The corresponding line is '(New-Object > system.Data.odbc.odbcDataAdapter($cmd)).fill($ds) | out-null '. Correct > the script and reschedule the job. The error information returned by > PowerShell is: 'Exception calling "Fill" with "1" argument(s): "The > connection has been disabled." '. Process Exit Code -1. > > Not too familiar with postgreSQL. > > Thanks! > --000000000000060ea805c2173268 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi David,

How about increasing the Comm= andTimeout(default 30sec)?
$cmd.CommandTimeout =3D 300, for examp= le.

regards,
Hiroshi Inoue

2021= =E5=B9=B45=E6=9C=8811=E6=97=A5(=E7=81=AB) 6:14 David Parenteau <dparenteau@axper.com>:
Using=C2=A0PostgreSQL 12.3 (Ubuntu 12.3-1.pgdg18.04+1) on x86_64-pc-linux-g= nu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit
I use driver PostgresSQL Unicode(x64)=C2=A0 version 13.00.00.00


I have a query that is executed through an ODBC connection in a Powershell = 5.1 script. I use the Fill() method to retreive about 3500 records daily. W= hen the script works, it takes 2-5 minutes to execute and retrieve data.
Probleme is that the script "fails" half of the time approx. When= this occurs, the powershell script does stop only after 2h and 30 seconds.= =C2=A0
We double checked the postgres logs and when this occurs, we see that the q= uery successfully completed within 6 minutes always.=C2=A0 I don't know= what to look for. any Idea?

Below is the error got:

Executed as user: NT Service\SQLSERVERAGENT. A job step received an error a= t line 94 in a PowerShell script. The corresponding line is '(New-Objec= t system.Data.odbc.odbcDataAdapter($cmd)).fill($ds) | out-null =C2=A0'.= Correct the script and reschedule the job. The error information returned by PowerShell is: 'Exception calling "= Fill" with "1" argument(s): "The connection has been di= sabled." =C2=A0'.=C2=A0 Process Exit Code -1.

Not too familiar with postgreSQL.

Thanks!
--000000000000060ea805c2173268--