Skip to content

Connection Id and Parallel For Loop #118

@stpierrelab

Description

@stpierrelab

Hi DataJoint Team,
I have set up a MySQL server on a Synology NAS with 6 GB of ram to work with DataJoint. I noticed that after having a prolonged time of usage (days), the ram usage on the server (used by the mariaDB) would gradually increase to a very high level, sometime resulting restarts. I check the issue 58 but also noticed an issue that I'm not sure if related:
The connection_id() shown when establishing the link is not the same as what is displayed by calling dj.conn, under dj.Connection.connId.

 0:  10.###.###.### via TCP/IP           Server version 5.5.5-10.0.32-MariaDB

  connection_id() 
 +---------------+
  132

And close(dj.conn) always gives out prompt for id 0 connection:

>> close(dj.conn);
closing DataJoint connection #0

Could it be that the connection is not closed properly by calling close(dj.conn) thus being accumulated?
My guess on this comes also from using the parfor loop like this:

parfor i = 1:4
    dj.conn();
    parpopulate(xxxx.yyyyy)
    close(dj.conn);
end

and after the run, the ram is not returned to the idle level. Please comment on my way of using parpopulate and the issue I found.
Thanks for your support!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions