Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. DB connections running in parallel crashes
QtWS25 Last Chance

DB connections running in parallel crashes

Scheduled Pinned Locked Moved Solved 3rd Party Software
databasethreadsmultithreaded
3 Posts 2 Posters 438 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JeniaR
    wrote on 4 Jul 2023, 04:31 last edited by
    #1

    Hi,
    I tried to work with 2 DB connections from 2 QT threads. Module LIBEAY32.dll crashes. It's OpenSSL library ,which can be thread safe, but some callbacks need to be implemented for this to work. So, my conclusion is that QT doesn't do that. Is it a known issue? What's the advice for such design?
    Thanks,
    JR

    J 1 Reply Last reply 4 Jul 2023, 05:10
    0
    • J JeniaR
      4 Jul 2023, 04:31

      Hi,
      I tried to work with 2 DB connections from 2 QT threads. Module LIBEAY32.dll crashes. It's OpenSSL library ,which can be thread safe, but some callbacks need to be implemented for this to work. So, my conclusion is that QT doesn't do that. Is it a known issue? What's the advice for such design?
      Thanks,
      JR

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 4 Jul 2023, 05:10 last edited by
      #2

      @JeniaR Do you really need threads for DB access? Qt is asynchronous. Also, can you provide the stack trace to see what exactly is happening? Can you show your code (especially: do you create all needed instances in the threads?)?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply 4 Jul 2023, 14:44
      0
      • J jsulm
        4 Jul 2023, 05:10

        @JeniaR Do you really need threads for DB access? Qt is asynchronous. Also, can you provide the stack trace to see what exactly is happening? Can you show your code (especially: do you create all needed instances in the threads?)?

        J Offline
        J Offline
        JeniaR
        wrote on 4 Jul 2023, 14:44 last edited by
        #3

        @jsulm While I was looking for piece of code to post, I actually found the problem in it. In some place, the connection wasn't passed to a query and it was associated with a "default" connection. @jsulm, thank you for the help!

        1 Reply Last reply
        0
        • S SGaist has marked this topic as solved on 4 Jul 2023, 18:37

        2/3

        4 Jul 2023, 05:10

        • Login

        • Login or register to search.
        2 out of 3
        • First post
          2/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved