[systemd-devel] Socket activation in parallel?

Daniel Tihelka dtihelka at gmail.com
Thu Mar 5 22:16:00 UTC 2020


Hello,
I am adding socket activation to a daemon. It basically works well, but for
multiple simultaneous connections, the systemd seems to serialize the
incoming requests, spawning the daemon for each request only after the
previous request is served (i.e. the daemon terminates).

Is it really the case? Or I am doing something wrong?

I use "classic" approach as:

n = sd_listen_fds(0);
if (n >= 1) {
  for (int fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd++)
 ...


So, the question is: how to convince systemd to spawn instances in parallel
every time a new connection is established on the socket, instead of
serializing them? Although the server is contacted rather rarely (and thus
I deal with socket activation), it takes a longer time to finish with the
client. And when would multiple clients contact the server simultaneously,
they will wait for a long time ...

Thank you for your advice.

Best regards,
Dan T.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200305/aa9c1c79/attachment.htm>


More information about the systemd-devel mailing list