List:MySQL++« Previous MessageNext Message »
From:<devyani.sapre Date:August 1 2010 10:03am
Subject:Core dump while connection/query/store operation
View as plain text  
Hi All
I run multiple threads which query the database. Intermittently I get a dump with the
cause of the error as "Lost conection to MYSQL server during query". My application
connects to the database during the startup, but due to this error, I am now also checking
the connection before making the query and if the connection is not available, doing a
connection and then executing my query. 
I haven;t found much help on the web w.r.t this problem. Have tried pretty much of what is
1) Changing timout - 8 hrs
2) Ping before query
3) Catching exceptions.
Below is one of the core dump I got for actual connection in progress (before trying to
run the query) :
#0  0x0000003d24450ceb in ?? () from /usr/lib64/mysql/
(gdb) bt
#0  0x0000003d24450ceb in ?? () from /usr/lib64/mysql/
#1  0x0000003d24451069 in my_net_read () from /usr/lib64/mysql/
#2  0x0000003d2444a862 in cli_safe_read () from /usr/lib64/mysql/
#3  0x0000003d2444c25f in mysql_real_connect () from /usr/lib64/mysql/
#4  0x00002b849049c44f in mysqlpp::DBDriver::connect (this=0x104926c0, host=0x107e4d58
"", socket_name=0x0,
    port=0, db=0x104973b8 "SUBSCRIBER", user=0x0, password=0x0) at ./lib/dbdriver.cpp:89
#5  0x00002b8490497d29 in mysqlpp::Connection::connect (this=0x2b84915c9bc0, db=0x104973b8
    server=0x10497458 "", user=0x0, password=0x0, port=0) at
#6  0x00002b84913c17ac in UnifiedUserProfileDAO::initializeDB (this=0x10495060) at
#7  0x00002b84913c3a73 in UnifiedUserProfileDAO::get_TA_Option (this=0x10495060,
        {static npos = 18446744073709551615, _M_dataplus =
{<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> =
{<No data fields>}, <No data fields>}, _M_p = 0x42577580
"\b\\\001»*"}}) at UnifiedUserProfileDAO.cpp:59
What I have observed is that the first time connection during startup is of no use as
after a couple of queries, the connection is lost and before a new query can be run, a
check and reconnect is necessary. Is it expected? Shouldn't one connection be up and
running for sometime.

Kindly help.

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message
are intended for the exclusive use of the addressee(s) and may contain proprietary,
confidential or privileged information. If you are not the intended recipient, you should
not disseminate, distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this
email and any attachments for the presence of viruses. The company accepts no liability
for any damage caused by any virus transmitted by this email.

Core dump while connection/query/store operationdevyani.sapre1 Aug