Re: [Cppcms-users] CPPDB - connection time out
Brought to you by:
artyom-beilis
From: <la...@sa...> - 2012-07-06 15:16:25
|
The error I am having is: "Error: Unable to open database file". I have a connection -> cppdb::session sql("sqlite3:db=/home/common/source/DB/Mdata.db"); I have a process that does a lot of selects, and updates, but always after aproximatly 600 seconds i get this error, .... I also found that this error occurs when i try to do an update (when i do stat.exec()). my updates are like this (It works fine, on the first 600 seconds, and then it gives an error): ////////////////////////////////////////////// stat = sql << "update reading_h set read_id = ?, date = ?, time = ? where read_id = ? and mrg_id = ?" << readId << date << time << headerReadId << mrgId; stat.exec(); stat.reset(); stat.clear(); ///////////////////////////////////////////// Quoting Artyom Beilis <art...@ya...>: > There is no such thing as "lost a connection" with sqlite3 DB... > The sqlite3 database is a file and database engine operates on the file > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > >> >> ------------------------- >> FROM: "la...@sa..." <la...@sa...> >> TO: cpp...@li... >> SENT: Friday, July 6, 2012 1:58 PM >> SUBJECT: [Cppcms-users] CPPDB - connection time out >> >> >> Hi, >> I am working with cppdb, with sqlite. >> >> I am doing a connection with cppdb::session >> sql("sqlite3:db=/home/common/source/DB/Mdata.db"); >> >> But i think i lost connection after 600 seconds (10min). I >> already try >> to change to, 'opt_reconnect = 1', >> >> but still does not work, .... i have always error after >> 10min. Error: >> Unable to open database connection. >> >> >> >> >> >> Thanks, >> Leandro >> >> >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can >> respond. Discussions >> will include endpoint security, mobile security and the >> latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> > > > |