[MonetDB-users] MAPI interface error
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
On 23-12-2010 02:43:05 -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?
Are there any messages from the server? You get disconnected here. It may be that the server is kicking you out somehow.
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.
No, I don't get any distinguishable messages from the server. However, I am
using merovingian, so everything is in the background. The merovingian log
file however, is empty.
Any other thoughts? At a loss here.
-Brett
On Thu, Dec 23, 2010 at 2:58 AM, Fabian Groffen
On 23-12-2010 02:43:05 -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?
Are there any messages from the server? You get disconnected here. It may be that the server is kicking you out somehow.
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.
------------------------------------------------------------------------------ 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
On 23-12-2010 03:04:37 -0500, Brett Spurrier wrote:
No, I don't get any distinguishable messages from the server. However, I am using merovingian, so everything is in the background. The merovingian log file however, is empty.
I guess you mean it doesn't show anything special for you. This log should always contain some chattering about when connections are being made and more.
Any other thoughts? At a loss here.
You may hit a stack limit, and get disconnected without warning. How does INSERT_INTO_STATEMENT look like?
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.
Hi Stefan and Fabian,
I'll try to answer both of you here. (By the way, I really appreciate your
help).
I am using "MonetDB server v5.22.3 (64-bit), based on kernel v1.40.3 (64-bit
oids)" on my Mac OSX 10.6.
The DB schema looks as follows:
Columns
------------------------------
title VARCHAR(200)
guid VARCHAR(50)
D0 FLOAT
D1 FLOAT
...
D63 FLOAT
An example INSERT statement looks as follows:
INSERT INTO imagesignatures VALUES ('BK-2000000105000.png',
'9e5a1c52-6dd7-4b29-8c88-db1a67b73b6e', 0.0012992, -0.00648533, 0.0160408,
0.0194895, -0.00426406, -0.00972571, 0.0160934, 0.0273353, 0.0011832,
-0.00841318, 0.00864345, 0.0160668, -0.000174525, -0.0103183, 0.0114333,
0.0213318, -0.0123529, 0.117436, 0.0747747, 0.169459, 0.00168713, 0.237856,
0.196901, 0.293636, -0.00689568, 0.172451, 0.144271, 0.207795, 0.00808731,
0.0852854, 0.0685582, 0.251899, 0.0527458, -0.00125575, 0.108289, 0.100469,
-0.0694842, 0.0841492, 0.32303, 0.199593, -0.0168043, -0.00444074, 0.423218,
0.137524, -0.0467394, 0.00776669, 0.151014, 0.19008, 0.0505521, 0.00327318,
0.0949606, 0.125157, -0.0277652, -0.0367558, 0.108567, 0.11868, -0.0942212,
-0.000443912, 0.189012, 0.177837, 0.0256825, -0.0204917, 0.112957,
0.111767);
I have attached the LOG file (merovingian.log). I'm not sure what I am
looking for in there, but there doesn't seem to be any major errors sticking
out.
Any thoughts? The set up is "out of the box" as is.
Thanks a million,
Brett
On Thu, Dec 23, 2010 at 3:10 AM, Fabian Groffen
On 23-12-2010 03:04:37 -0500, Brett Spurrier wrote:
No, I don't get any distinguishable messages from the server. However, I am using merovingian, so everything is in the background. The merovingian log file however, is empty.
I guess you mean it doesn't show anything special for you. This log should always contain some chattering about when connections are being made and more.
Any other thoughts? At a loss here.
You may hit a stack limit, and get disconnected without warning. How does INSERT_INTO_STATEMENT look like?
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.
------------------------------------------------------------------------------ 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
Looks like the log file didn't attach. Here it is.
-Brett
On Thu, Dec 23, 2010 at 3:48 AM, Brett Spurrier
Hi Stefan and Fabian,
I'll try to answer both of you here. (By the way, I really appreciate your help).
I am using "MonetDB server v5.22.3 (64-bit), based on kernel v1.40.3 (64-bit oids)" on my Mac OSX 10.6.
The DB schema looks as follows: Columns ------------------------------ title VARCHAR(200) guid VARCHAR(50) D0 FLOAT D1 FLOAT ... D63 FLOAT
An example INSERT statement looks as follows: INSERT INTO imagesignatures VALUES ('BK-2000000105000.png', '9e5a1c52-6dd7-4b29-8c88-db1a67b73b6e', 0.0012992, -0.00648533, 0.0160408, 0.0194895, -0.00426406, -0.00972571, 0.0160934, 0.0273353, 0.0011832, -0.00841318, 0.00864345, 0.0160668, -0.000174525, -0.0103183, 0.0114333, 0.0213318, -0.0123529, 0.117436, 0.0747747, 0.169459, 0.00168713, 0.237856, 0.196901, 0.293636, -0.00689568, 0.172451, 0.144271, 0.207795, 0.00808731, 0.0852854, 0.0685582, 0.251899, 0.0527458, -0.00125575, 0.108289, 0.100469, -0.0694842, 0.0841492, 0.32303, 0.199593, -0.0168043, -0.00444074, 0.423218, 0.137524, -0.0467394, 0.00776669, 0.151014, 0.19008, 0.0505521, 0.00327318, 0.0949606, 0.125157, -0.0277652, -0.0367558, 0.108567, 0.11868, -0.0942212, -0.000443912, 0.189012, 0.177837, 0.0256825, -0.0204917, 0.112957, 0.111767);
I have attached the LOG file (merovingian.log). I'm not sure what I am looking for in there, but there doesn't seem to be any major errors sticking out.
Any thoughts? The set up is "out of the box" as is.
Thanks a million, Brett
On Thu, Dec 23, 2010 at 3:10 AM, Fabian Groffen
wrote: On 23-12-2010 03:04:37 -0500, Brett Spurrier wrote:
No, I don't get any distinguishable messages from the server. However, I am using merovingian, so everything is in the background. The merovingian log file however, is empty.
I guess you mean it doesn't show anything special for you. This log should always contain some chattering about when connections are being made and more.
Any other thoughts? At a loss here.
You may hit a stack limit, and get disconnected without warning. How does INSERT_INTO_STATEMENT look like?
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.
------------------------------------------------------------------------------ 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
The log file is still being filtered out.
Here is my dropbox link to the log file:
http://dl.dropbox.com/u/4402291/merovingian.log
Many thanks,
Brett
On Thu, Dec 23, 2010 at 3:49 AM, Brett Spurrier
Looks like the log file didn't attach. Here it is. -Brett
On Thu, Dec 23, 2010 at 3:48 AM, Brett Spurrier
wrote: Hi Stefan and Fabian,
I'll try to answer both of you here. (By the way, I really appreciate your help).
I am using "MonetDB server v5.22.3 (64-bit), based on kernel v1.40.3 (64-bit oids)" on my Mac OSX 10.6.
The DB schema looks as follows: Columns ------------------------------ title VARCHAR(200) guid VARCHAR(50) D0 FLOAT D1 FLOAT ... D63 FLOAT
An example INSERT statement looks as follows: INSERT INTO imagesignatures VALUES ('BK-2000000105000.png', '9e5a1c52-6dd7-4b29-8c88-db1a67b73b6e', 0.0012992, -0.00648533, 0.0160408, 0.0194895, -0.00426406, -0.00972571, 0.0160934, 0.0273353, 0.0011832, -0.00841318, 0.00864345, 0.0160668, -0.000174525, -0.0103183, 0.0114333, 0.0213318, -0.0123529, 0.117436, 0.0747747, 0.169459, 0.00168713, 0.237856, 0.196901, 0.293636, -0.00689568, 0.172451, 0.144271, 0.207795, 0.00808731, 0.0852854, 0.0685582, 0.251899, 0.0527458, -0.00125575, 0.108289, 0.100469, -0.0694842, 0.0841492, 0.32303, 0.199593, -0.0168043, -0.00444074, 0.423218, 0.137524, -0.0467394, 0.00776669, 0.151014, 0.19008, 0.0505521, 0.00327318, 0.0949606, 0.125157, -0.0277652, -0.0367558, 0.108567, 0.11868, -0.0942212, -0.000443912, 0.189012, 0.177837, 0.0256825, -0.0204917, 0.112957, 0.111767);
I have attached the LOG file (merovingian.log). I'm not sure what I am looking for in there, but there doesn't seem to be any major errors sticking out.
Any thoughts? The set up is "out of the box" as is.
Thanks a million, Brett
On Thu, Dec 23, 2010 at 3:10 AM, Fabian Groffen
wrote: On 23-12-2010 03:04:37 -0500, Brett Spurrier wrote:
No, I don't get any distinguishable messages from the server. However, I am using merovingian, so everything is in the background. The merovingian log file however, is empty.
I guess you mean it doesn't show anything special for you. This log should always contain some chattering about when connections are being made and more.
Any other thoughts? At a loss here.
You may hit a stack limit, and get disconnected without warning. How does INSERT_INTO_STATEMENT look like?
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.
------------------------------------------------------------------------------ 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
Hi again,
I made a bit of some roundabout progress. So maybe it will help you diagnose
the issue (if it is a global one...as I don't think I am doing anything
incorrect at least).
I am sending a total of 125,000 INSERT statements (of the same format I sent
in the previous email). And I would receive the error/crash after
approximately 10,000 inserts. So to get around the error, I paused my
program after 10,000 inserts, then stopped and started the database using
"monetdb stop/start dbname" and the continue my program for another 10,000
inserts.
I am not sure what this means, but clearly a reset of the DB is correcting
the issue.
Maybe this will help diagnose the issue.
I think my permanent solution will be to get this running on another
computer (I'll try a windows machine this time), and hope for the best.
Thanks for your help,
Brett
On Thu, Dec 23, 2010 at 3:52 AM, Brett Spurrier
The log file is still being filtered out. Here is my dropbox link to the log file:
http://dl.dropbox.com/u/4402291/merovingian.log
Many thanks, Brett
On Thu, Dec 23, 2010 at 3:49 AM, Brett Spurrier
wrote: Looks like the log file didn't attach. Here it is. -Brett
On Thu, Dec 23, 2010 at 3:48 AM, Brett Spurrier
wrote:
Hi Stefan and Fabian,
I'll try to answer both of you here. (By the way, I really appreciate your help).
I am using "MonetDB server v5.22.3 (64-bit), based on kernel v1.40.3 (64-bit oids)" on my Mac OSX 10.6.
The DB schema looks as follows: Columns ------------------------------ title VARCHAR(200) guid VARCHAR(50) D0 FLOAT D1 FLOAT ... D63 FLOAT
An example INSERT statement looks as follows: INSERT INTO imagesignatures VALUES ('BK-2000000105000.png', '9e5a1c52-6dd7-4b29-8c88-db1a67b73b6e', 0.0012992, -0.00648533, 0.0160408, 0.0194895, -0.00426406, -0.00972571, 0.0160934, 0.0273353, 0.0011832, -0.00841318, 0.00864345, 0.0160668, -0.000174525, -0.0103183, 0.0114333, 0.0213318, -0.0123529, 0.117436, 0.0747747, 0.169459, 0.00168713, 0.237856, 0.196901, 0.293636, -0.00689568, 0.172451, 0.144271, 0.207795, 0.00808731, 0.0852854, 0.0685582, 0.251899, 0.0527458, -0.00125575, 0.108289, 0.100469, -0.0694842, 0.0841492, 0.32303, 0.199593, -0.0168043, -0.00444074, 0.423218, 0.137524, -0.0467394, 0.00776669, 0.151014, 0.19008, 0.0505521, 0.00327318, 0.0949606, 0.125157, -0.0277652, -0.0367558, 0.108567, 0.11868, -0.0942212, -0.000443912, 0.189012, 0.177837, 0.0256825, -0.0204917, 0.112957, 0.111767);
I have attached the LOG file (merovingian.log). I'm not sure what I am looking for in there, but there doesn't seem to be any major errors sticking out.
Any thoughts? The set up is "out of the box" as is.
Thanks a million, Brett
On Thu, Dec 23, 2010 at 3:10 AM, Fabian Groffen
wrote: On 23-12-2010 03:04:37 -0500, Brett Spurrier wrote:
No, I don't get any distinguishable messages from the server. However, I am using merovingian, so everything is in the background. The merovingian log file however, is empty.
I guess you mean it doesn't show anything special for you. This log should always contain some chattering about when connections are being made and more.
Any other thoughts? At a loss here.
You may hit a stack limit, and get disconnected without warning. How does INSERT_INTO_STATEMENT look like?
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.
------------------------------------------------------------------------------ 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
On 23-12-2010 13:51:33 -0500, Brett Spurrier wrote:
I think my permanent solution will be to get this running on another computer (I'll try a windows machine this time), and hope for the best.
You better try a linux machine... Still it's good to know what's actually going on. Can you show us the output of monetdb status?
By "status", do you mean "Shell>monetdb status" ?
That command outputs the following:
brett-spurriers-macbook-pro:bin Brett$ sudo monetdb status
name state uptime health last crash
eyebuy running 5m 40s 100%, 25m -
demo stopped 100%, 20m -
test stopped 100%, 43m -
eyebuy is my database.
I do have access to a linux machine too, so I'll try that.
Thanks,
Brett
On Thu, Dec 23, 2010 at 1:59 PM, Fabian Groffen
On 23-12-2010 13:51:33 -0500, Brett Spurrier wrote:
I think my permanent solution will be to get this running on another computer (I'll try a windows machine this time), and hope for the best.
You better try a linux machine...
Still it's good to know what's actually going on. Can you show us the output of monetdb status?
------------------------------------------------------------------------------ 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
On 23-12-2010 14:07:07 -0500, Brett Spurrier wrote:
By "status", do you mean "Shell>monetdb status" ?
That command outputs the following:
brett-spurriers-macbook-pro:bin Brett$ sudo monetdb status name state uptime health last crash eyebuy running 5m 40s 100%, 25m - demo stopped 100%, 20m - test stopped 100%, 43m -
eyebuy is my database.
Yup, and it reports not a single crash, so the database is not crashing, but disconnecting you for some reason. I suspect something leaking. I'll try and see if I can reproduce this.
On 23-12-2010 20:14:31 +0100, Fabian Groffen wrote:
On 23-12-2010 14:07:07 -0500, Brett Spurrier wrote:
By "status", do you mean "Shell>monetdb status" ?
That command outputs the following:
brett-spurriers-macbook-pro:bin Brett$ sudo monetdb status name state uptime health last crash eyebuy running 5m 40s 100%, 25m - demo stopped 100%, 20m - test stopped 100%, 43m -
eyebuy is my database.
Yup, and it reports not a single crash, so the database is not crashing, but disconnecting you for some reason. I suspect something leaking. I'll try and see if I can reproduce this.
I already fixed one crash in the communication library, while playing with your example, so thanks! I'll try to run something like your given code example and see if I can finish it.
Glad to hear it! I'd be happy to zip up my entire project if it might help
you. There are several Mac-specific dependencies though, so ...
The workhorse routine is the one I sent previously though.
-Brett
On Thu, Dec 23, 2010 at 3:37 PM, Fabian Groffen
On 23-12-2010 20:14:31 +0100, Fabian Groffen wrote:
On 23-12-2010 14:07:07 -0500, Brett Spurrier wrote:
By "status", do you mean "Shell>monetdb status" ?
That command outputs the following:
brett-spurriers-macbook-pro:bin Brett$ sudo monetdb status name state uptime health last crash eyebuy running 5m 40s 100%, 25m - demo stopped 100%, 20m - test stopped 100%, 43m -
eyebuy is my database.
Yup, and it reports not a single crash, so the database is not crashing, but disconnecting you for some reason. I suspect something leaking. I'll try and see if I can reproduce this.
I already fixed one crash in the communication library, while playing with your example, so thanks!
I'll try to run something like your given code example and see if I can finish it.
------------------------------------------------------------------------------ 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
On 23-12-2010 16:14:52 -0500, Brett Spurrier wrote:
Glad to hear it! I'd be happy to zip up my entire project if it might help you. There are several Mac-specific dependencies though, so ...
The workhorse routine is the one I sent previously though.
With your program, your insert query, and the schema you described, I let it run till 25000. Apart from being slow, I didn't observe any disconnection. I tested this on a powerpc-apple-darwin9 machine. Maybe your problem is really specific to x86_64-apple-darwinX that you run on. I can try on such machine as well, later.
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) |
participants (3)
-
Brett Spurrier
-
Fabian Groffen
-
Stefan Manegold