Hi Brett, "Connection terminated" usually means that the server (mserver5) has crashed. Could you please let us know, which version of MonetDB you are running on what kind of system (e.g., provide the output of `mserver5 --version`)? Moreover, could you please check the mserver5 concole (or merovingian logs) for any output or error messages and share them with us for analysis? Finally, what exactly do you mena with "*recursive* INSERT INTO statement"? Could you possibly share your DB schema, insert statement(s) and maybe even some sample data with us for further inspection? Thanks, and sorry for the inconveniences! Stefan On Thu, Dec 23, 2010 at 02:43:05AM -0500, Brett Spurrier wrote:
Hi all, I am having a bit of trouble and I am hoping a seasoned MonetDB expert can lend some advice.
I am using the MAPI interface in my C/C++ application to talk to my MonetDB instance. I have a recursive INSERT INTO statement which populates the database, and it initially works pretty well.
However, as I populate more (past 200 inserts in my case), I get a MAPI error (exampled by: mapi_explain_result()):
MAPI = monetdb@localhost:50000 ACTION= mapi_start_talking ERROR = !Connection terminated
No real reason as to why. Has anyone seen this before?
My code:
MapiHdl query(Mapi dbh, char *q) { MapiHdl ret = NULL; if ((ret = mapi_query(dbh, q)) == NULL || mapi_error(dbh) != MOK) die(dbh, ret); return(ret); }
void update(Mapi dbh, char *q) { MapiHdl ret = query(dbh, q); if (mapi_close_handle(ret) != MOK) die(dbh, ret); }
void main() { dbh = mapi_connect("localhost", 50000, "monetdb", "monetdb", "sql", "dbname"); if (mapi_error(dbh)) { die(dbh, hdl); }
for (int i=0; i< 2500; i++) { char *p = INSERT_INTO_STATEMENT; update(dbh, p); }
}
Does anyone see any reason that the MAPI would choke mid way through the For loop?
Any help would be majorly appreciated. I am at a loss.
Cheers, Brett
------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- | Stefan.Manegold @ CWI.nl | DB Architectures (INS1) | | http://CWI.nl/~manegold/ | Science Park 123 (L321) | | Tel.: +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) |