From: | Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com> |
---|---|
To: | psycopg(at)postgresql(dot)org |
Subject: | Re: psycopg2 conn.poll() hangs when used with sshtunnel |
Date: | 2018-10-30 12:36:24 |
Message-ID: | CANxoLDesBkV9=qpg22-9nG=JYgvUuo3Xm+iDxSWwLVReTiEC7g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | psycopg |
Hi Team
I have created one sample application to replicate the issue. Attached is
the sample application, please read "README.txt" file to proceed further.
Can someone please suggest why poll() function hangs when run wrong query
with sshtunnel v0.1.4.
On Mon, Oct 8, 2018 at 12:19 PM Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
wrote:
> Hi Team
>
> As one issue(*https://github.com/psycopg/psycopg2/issues/781
> <https://github.com/psycopg/psycopg2/issues/781>*) has already been
> created for conn.poll() function hangs when executes COPY command in async
> mode. Similarly conn.poll() functions hangs when we run wrong query in
> async mode using sshtunnel <https://pypi.org/project/sshtunnel/> v0.1.3.
>
> Can someone please suggest what went wrong when used sshtunnel, or the
> pointers/reason where poll() method hangs.
>
> On Fri, Sep 28, 2018 at 5:43 PM Akshay Joshi <
> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>
>> Hello
>>
>> I am using psycopg2 2.7.4 to connect to the PostgreSQL database server
>> using asynchronoussupport. It is working absolutely fine. I have used
>> sshtunnel <https://pypi.org/project/sshtunnel/> v0.1.3 in pgAdmin4. When
>> I connect the PostgreSQL database server using ssh tunnel and run the
>> valid/correct query it works fine, but when I run any wrong query(invalid
>> column of table) my application gets hang on conn.poll() function.
>>
>> Please refer the code how we use conn.poll() with timeouts
>> https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=blob;f=web/pgadmin/utils/driver/psycopg2/connection.py;h=4f11c12b30882209c308cb3558e67189c97ea31e;hb=15fe26a7106610b710f3de5b604cd038302c926a#l1363
>>
>> Can anyone please provide some pointers, suggestions?
>>
>> --
>> *Akshay Joshi*
>>
>> *Sr. Software Architect *
>>
>>
>>
>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>
>
>
> --
> *Akshay Joshi*
>
> *Sr. Software Architect *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>
--
*Akshay Joshi*
*Sr. Software Architect *
*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
Attachment | Content-Type | Size |
---|---|---|
Hang_Sample_Application.zip | application/zip | 158.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Daniele Varrazzo | 2018-10-30 12:52:08 | Re: psycopg2 conn.poll() hangs when used with sshtunnel |
Previous Message | Daniele Varrazzo | 2018-10-29 12:12:56 | Re: Feature branches merged to master for 2.8 release |