Project

General

Profile

Actions

Bug #4936

open

Dbo backend reconnect and reentract statement exception

Added by Saif Rehman almost 8 years ago. Updated almost 8 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
Roel Standaert
Target version:
-
Start date:
05/25/2016
Due date:
% Done:

0%

Estimated time:

Description

I have a task scheduler in my Wt application which repeatedly runs the same instances of Wt::Dbo::Query<...> after an interval. It works fine however in the case where connection to the backend(MySQL) is lost and that Wt Dbo reconnects and runs those queries after reconnecting, an uncatchable exception is thrown stating that reentrant queries/statements are not supported.

It is difficult to make a test file since the problem occurs sometimes when it reconnects. In my case it happens when my laptop wakes up from a long hibernation or sleep. However if you have trouble reproducing the error I can write something up.

My suggestion to reproduce is:

1. Create a valid Dbo::Query instance(s)

  1. Create a function that is repeatedly called in an interval which runs the query(s) and run the test app (I use WIOService::post)
  2. Turn off backend
  3. Break when connection lost is detected by Wt Dbo
  4. Turn on backend and let Wt Dbo reconnect and run the query again
  5. I guess it should give you the reentrant access error now
Actions #1

Updated by Koen Deforche almost 8 years ago

  • Status changed from New to InProgress
  • Assignee set to Roel Standaert
Actions #2

Updated by Roel Standaert almost 8 years ago

  • Status changed from InProgress to Feedback

I haven't been able to reproduce this exact behavior, but I observed another issue when debugging this. The reconnection behavior has now changed from relying on automatic reconnects to an explicit reconnect, so can you check if the current version on GitHub still has this issue?

Actions #3

Updated by Saif Rehman almost 8 years ago

Hi, sorry for the very late reply, I shall check it out when I get free from my current responsibilities.

Actions

Also available in: Atom PDF