Running on Ubuntu 16.04 LTS, database and clients run on the same system.
I am using the Dec2016 branch, and noticed that the database connections
get dropped randomly, but in high frequency.
This error occurs irrespective for whether I use mclient, python package
(pymonetdb) or the JDBC driver from the site.
>From what I could figure if I use the forward=redirect option instead of
the default proxy, the frequency reduces drastically, but is still present
(if I leave the mclient connection …
[View More]idle for like 5 minutes it will drop -
is there an idle time out somewhere ? Also is there a way to force a
network connection locally instead of unix socket ? ).
Sample of some messages For the default proxy option
===========================
>From merovingian.log
2016-12-01 10:59:33 MSG merovingian[29445]: target connection is on local
UNIX domain socket, passing on filedescriptor instead of proxying
Python error due to dropped connection.
>>> rows=cursor.execute("SELECT 'HELLO';");
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/pymonetdb/sql/cursors.py",
line 164, in execute
block = self.connection.execute(query)
File "/usr/local/lib/python3.5/dist-packages/pymonetdb/sql/connections.py",
line 133, in execute
return self.command('s' + query + ';')
File "/usr/local/lib/python3.5/dist-packages/pymonetdb/sql/connections.py",
line 138, in command
return self.mapi.cmd(command)
File "/usr/local/lib/python3.5/dist-packages/pymonetdb/mapi.py", line
208, in cmd
self._putblock(operation)
File "/usr/local/lib/python3.5/dist-packages/pymonetdb/mapi.py", line
310, in _putblock
self._putblock_inet(block)
File "/usr/local/lib/python3.5/dist-packages/pymonetdb/mapi.py", line
321, in _putblock_inet
self.socket.send(flag)
BrokenPipeError: [Errno 32] Broken pipe
JDBC Error (I am using PyCharm to execute some SQLs)
[08000] Connection to server lost! (mserver still alive?)
On the other hand, mclient does not show any error message, tried -X
option, but no message when it dies. It just dies while executing a command
(probably because the connection is dropped)
A peek at netstat shows that the connections disappear from it before
mclient dies.
$ netstat -anp | grep 50000
tcp 0 0 127.0.0.1:50000 0.0.0.0:* LISTEN
29445/monetdbd
udp 0 0 127.0.0.1:50000 0.0.0.0:*
29445/monetdbd
unix 2 [ ACC ] STREAM LISTENING 3869978213
<(386)%20997-8213> 29445/monetdbd /tmp/.s.monetdb.50000
unix 2 [ ACC ] STREAM LISTENING 3869978215
<(386)%20997-8215> 29445/monetdbd /tmp/.s.merovingian.50000
unix 3 [ ] STREAM CONNECTED 3875263615 29486/mserver5
/tmp/.s.monetdb.50000
unix 2 [ ] STREAM CONNECTED 3871676942 29486/mserver5
/tmp/.s.monetdb.50000
$ netstat -anp | grep 50000
tcp 0 0 127.0.0.1:50000 0.0.0.0:* LISTEN
29445/monetdbd
udp 0 0 127.0.0.1:50000 0.0.0.0:*
29445/monetdbd
unix 2 [ ACC ] STREAM LISTENING 3869978213
<(386)%20997-8213> 29445/monetdbd /tmp/.s.monetdb.50000
unix 2 [ ACC ] STREAM LISTENING 3869978215
<(386)%20997-8215> 29445/monetdbd /tmp/.s.merovingian.50000
unix 2 [ ] STREAM CONNECTED 3871676942 29486/mserver5
/tmp/.s.monetdb.50000
After switching to the forward option (where this issue is less frequent
to be bothersome)
===========================
>From merovingian.log
2016-12-01 11:22:59 MSG merovingian[29824]: redirecting client (local) for
database 'voc' to mapi:monetdb://cerberus:50001/voc
Although for most part the connections are stable, if and when mclient
dies, I do notice that the netstat entries are NOT being removed.
(see the entries piling up at the bottom though there are no active client
processes)
$ netstat -anp | grep 50000
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:50000 0.0.0.0:* LISTEN
29824/monetdbd
tcp 1 0 127.0.0.1:50000 127.0.0.1:35870
CLOSE_WAIT 29824/monetdbd
udp 0 0 127.0.0.1:50000 0.0.0.0:*
29824/monetdbd
unix 2 [ ACC ] STREAM LISTENING 3876967185 29824/monetdbd
/tmp/.s.monetdb.50000
unix 2 [ ACC ] STREAM LISTENING 3876967187 29824/monetdbd
/tmp/.s.merovingian.50000
unix 2 [ ] STREAM CONNECTED 3877116313 29824/monetdbd
/tmp/.s.monetdb.50000
unix 2 [ ] STREAM CONNECTED 3880819958 29824/monetdbd
/tmp/.s.monetdb.50000
unix 2 [ ] STREAM CONNECTED 3878012589 29824/monetdbd
/tmp/.s.monetdb.50000
unix 2 [ ] STREAM CONNECTED 3877885158 29824/monetdbd
/tmp/.s.monetdb.50000
Thanks,
Joseph
[View Less]
Hi all,
Has anyone had any luck building the sources with Python 3 ?
I tried building the Dec2016 branch from git, passing
--with-python3=/usr/bin/python3 --with-pyversion=/usr/bin/python3
--with-pyconfig=/usr/bin/python3-config
to configure, but received many errors during make under the pyapi
directory, such as.
/usr/include/python3.5m/object.h:86:5: error: missing braces around
initializer [-Werror=missing-braces]
{ _PyObject_EXTRA_INIT \
^
connection.c:159:5: …
[View More]note: in expansion of macro ‘PyObject_HEAD_INIT’
PyObject_HEAD_INIT(NULL)
^
/usr/include/python3.5m/object.h:86:5: note: (near initialization for
‘Py_ConnectionType.ob_base’)
{ _PyObject_EXTRA_INIT \
^
connection.c:159:5: note: in expansion of macro ‘PyObject_HEAD_INIT’
PyObject_HEAD_INIT(NULL)
^
connection.c:159:5: error: missing initializer for field ‘ob_size’ of
‘PyVarObject {aka struct <anonymous>}’ [-Werror=missing-field-initializers]
.................
connection.c:246:5: error: ‘return’ with a value, in function returning
void [-Werror]
import_array();
^
It looks like some of the macro definitions to make python3 header files
work with the pyapi source might be missing. I tried fixing some of the
sources like unicode.c, formatinput.c etc. But it looks like majority of
the source files have issues.
Thanks,
Joseph
[View Less]