Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-79054

QSqlQuery::exec() freezes over OpenVPN

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Need More Info
    • Priority: P3: Somewhat important
    • Resolution: Incomplete
    • Affects Version/s: 5.13.1
    • Fix Version/s: None
    • Component/s: SQL Support
    • Labels:
      None
    • Environment:
      Win7 32bit 4 GB RAM, OpenVpn
    • Platform/s:
      Windows

      Description

      In normal situation, locally or over LAN, when executing:

       
      query = QSqlQuery()
      success = query.exec("some SELECT SQL command")
       

      when query fails it returns false and everything is ok. I can choose what to do next. I usually have some loop with some delay and try more times and it executes finally.

      When executing this over OpenVPN, expecting 25,000+ records, query.exec() just freezes and freezes my desktop app. QSqlQuery::exec() is a black box, it certainly has some built-in timeout, because over LAN it relatively quickly returns false. One would expect it to do the same over OpenVPN. The loop here doesn't help, because exec() freezes.

      Moreover, after freeze, I have to kill the app and reconnect OpenVPN in order for connection to database and queries to work. Even psql doesn't work any more.

      As I can see, QSqlQuery::exec() doesn't let us parameterize timeout. It is hardcoded. But in this situation it wouldn't help, because the timeout activates locally or over LAN, but doesn't get the chance to activate over OpenVPN.

      This only happens with SELECT queries over OpenVPN that expect 25,000+ records in that query. For smaller queries, it works ok.

      I investigated Postgres QSqlQuery::setConnectOptions() but like you, I couldn't find anything of help.

      I think it is a Qt bug. QSqlQuery::exec() shouldn't freeze under any circumstances.

       

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            mabrand Mark Brand
            Reporter:
            petar Petar Djetlic
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes