[zeromq-dev] Maximum number of zactors?

Arnaud Loonstra arnaud at sphaero.org
Thu May 16 17:49:29 CEST 2019

Hi all,

I'm currently stress testing a setup with actors. What's the maximum 
number of running zactors? As it's using inproc no file descriptors are 
involved. I'm using this test:

     // mega zactor test
     zlist_t *spawned_act = zlist_new();
     for (int i=0;i<507;i++)
         zactor_t *act = zactor_new(echo_actor, "Hello actor");
         zlist_append(spawned_act, act);
     while(zlist_size(spawned_act) > 0)
         zactor_t *dstr = zlist_pop(spawned_act);

If I go beyond 507 actors I receive an assert:

src/zsock.c:88: zsock_new_checked: Assertion `self->handle' failed.

Which traces back to:

self->handle = zsys_socket (type, filename, line_nbr);

Which is a wrapper for creating a zmq socket.

Any ideas why there's is this limit of 507 actors?

I also tried with my own actor library which adds pub/sub sockets to the 
actor. I then have a maximum of 252 actors.



More information about the zeromq-dev mailing list