dbTalk Databases Forums  

Aparent connection lost resulting in crash

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss Aparent connection lost resulting in crash in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Julien Chavanton
 
Posts: n/a

Default Aparent connection lost resulting in crash - 09-25-2006 , 09:05 AM






------_=_NextPart_001_01C6E0A8.61FF8F86
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

When there is a problem with a connection the next time we call a
function like mysql_query() or mysql_ping() it does report an error
witch is fine but if I call

2 function in a row before reseting the connection the function crash
instead of reporting an error, I can leave with that.

=20

Now when a connection is left idle for some time and is probably
disconnect if I call mysql_query() it does crash instead of reporting an
error.

=20

How can I validate this properly or handle it correctly?


------_=_NextPart_001_01C6E0A8.61FF8F86--

Reply With Quote
  #2  
Old   
Julien Chavanton
 
Posts: n/a

Default RE: Aparent connection lost resulting in crash - 09-25-2006 , 09:08 AM






------_=_NextPart_001_01C6E0A9.05D6D7FE
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Looking at may trace, here is what is happening internally in the API:

=20

free_old_query

mysql_close

mysql_close

mysql_reconnect

mysql_send_query

mysql_real_query

mysql_query

=20

_____ =20

From: Julien Chavanton=20
Sent: September 25, 2006 9:42 AM
To: 'plusplus (AT) lists (DOT) mysql.com'
Subject: Aparent connection lost resulting in crash

=20

When there is a problem with a connection the next time we call a
function like mysql_query() or mysql_ping() it does report an error
witch is fine but if I call

2 function in a row before reseting the connection the function crash
instead of reporting an error, I can live with that.

=20

Now when a connection is left idle for some time and is probably
disconnect if I call mysql_query() it does crash instead of reporting an
error.

=20

How can I validate this properly or handle it correctly?


------_=_NextPart_001_01C6E0A9.05D6D7FE--

Reply With Quote
  #3  
Old   
Matt Dargavel
 
Posts: n/a

Default RE: Aparent connection lost resulting in crash - 09-25-2006 , 09:20 AM




Hi Julien,

I think the questions you're asking are MySql issues, and should
probably be taken up on a mailing list for the C API there. This mailing
list is for issues specific to the MySQL++ wrapper library.

Regards,

Matt.


-----Original Message-----
From: Julien Chavanton [mailto:jc (AT) atlastelecom (DOT) com]
Sent: 25 September 2006 14:42
To: plusplus (AT) lists (DOT) mysql.com
Subject: Aparent connection lost resulting in crash

When there is a problem with a connection the next time we call a function
like mysql_query() or mysql_ping() it does report an error witch is fine but
if I call

2 function in a row before reseting the connection the function crash
instead of reporting an error, I can leave with that.



Now when a connection is left idle for some time and is probably disconnect
if I call mysql_query() it does crash instead of reporting an error.



How can I validate this properly or handle it correctly?



--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #4  
Old   
Julien Chavanton
 
Posts: n/a

Default RE: Aparent connection lost resulting in crash - 09-25-2006 , 09:53 AM



Thank you, I do not find the C API mailing list in
http://lists.mysql.com/

Also the same "problem" exists while using Mysql++ how shall we deal
with connection lost exactly?





-----Original Message-----
From: Matt Dargavel [mailto:matt (AT) shout-telecoms (DOT) com]=20
Sent: September 25, 2006 10:13 AM
To: plusplus (AT) lists (DOT) mysql.com
Subject: RE: Aparent connection lost resulting in crash


Hi Julien,

I think the questions you're asking are MySql issues, and should
probably be taken up on a mailing list for the C API there. This
mailing
list is for issues specific to the MySQL++ wrapper library.

Regards,

Matt.


-----Original Message-----
From: Julien Chavanton [mailto:jc (AT) atlastelecom (DOT) com]=20
Sent: 25 September 2006 14:42
To: plusplus (AT) lists (DOT) mysql.com
Subject: Aparent connection lost resulting in crash

When there is a problem with a connection the next time we call a
function
like mysql_query() or mysql_ping() it does report an error witch is fine
but
if I call

2 function in a row before reseting the connection the function crash
instead of reporting an error, I can leave with that.

=20

Now when a connection is left idle for some time and is probably
disconnect
if I call mysql_query() it does crash instead of reporting an error.

=20

How can I validate this properly or handle it correctly?



--=20
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsu...ecom (DOT) com


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #5  
Old   
Warren Young
 
Posts: n/a

Default Re: Aparent connection lost resulting in crash - 09-26-2006 , 02:41 AM



Julien Chavanton wrote:
Quote:
Thank you, I do not find the C API mailing list in
http://lists.mysql.com/
There is no separate list. C API issues are handled on the main MySQL list.

Quote:
Also the same "problem" exists while using Mysql++ how shall we deal
with connection lost exactly?
Presumably you're using 5.0, which apparently has a feature to drop idle
connections. (This question has been coming up a lot lately....) If
so, turn on the connection retry option. Search the list...it's come up
twice recently.

I don't know how the library could deal with this any better than it
already does. That's not to say that it's nice...it's just that a
network connection failure is a pretty serious thing. MySQL++ itself
doesn't have the knowledge to do anything more than just ask the C API
to retry the connection, and throwing an exception is probably
excessive. Ideas solicited.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.