We are running multiple mserver5 processes under a single merovingian daemon. Our start up script looks like this:

     # start the merovingian daemon, the port for the daemon is defined in $MDB_HOME/etc/monetdb5.conf
    startproc -s -u $MDB_USER -g $MDB_GROUP $MDB_BINDIR/merovingian

    echo "Starting DATABASE1."
    startproc -f -t  5 -u $MDB_USER -g $MDB_GROUP $MDB_BINDIR/mserver5 --dbname=DATABASE1 --dbinit="include sql;" --set mapi_port=50010 &

    echo "Starting DATABASE2"
    startproc -f -t  5 -u $MDB_USER -g $MDB_GROUP $MDB_BINDIR/mserver5 --dbname=DATABASE2 --dbinit="include sql;" --set mapi_port=50011 &

    echo "Starting DATABASE3."
    startproc -f -t  5 -u $MDB_USER -g $MDB_GROUP $MDB_BINDIR/mserver5 --dbname=DATABASE3  --dbinit="include sql;" --set mapi_port=50012 &

    echo -e "Done"

So far all is well. The merovingian daemon is running on port 50000 (default),  and the default port for a mserver5 process is 50001, set in monetdb5.conf

If one of the databases crash (and this has been happening a lot with ver 5.3.0) then merovingian restarts the database on the default mapi port, 50001.  This is sort of OK, although the database is now running on a different port than the one assigned it. The real problem comes if another database crashes and merovignian then tries to restart it on the default mapi port.  That port is not available and the second database to crash is now down for good.

Is there any mechanism to configure the merovingian daemon to avoid this, such as giving it a pool of ports to use ?

By the way, as we were having a lot of crashes, which may be related to the JDBC driver (we are working in Java),  we have tried not using the merovingian daemon (losing it value obviously)  and connecting directly to each database as required. This 'appears' to be more stable, with very little real experience yet, as we have not had a crash since.

Matthew McKennirey