2

we use chrome remote desktop to perform remote access to ubuntu, but I am not able to enable more than 32 users (each user is a systemctl unit and after reaching 32 unit loaed, I cannot start others).

to list the loaded units use the command:

sudo systemctl reset-failed && sudo systemctl list-units 'chrome-remote*'

to activate the unit I use the command

sudo systemctl stop chrome-remote-desktop@<user>.service

[email protected] - Chrome Remote Desktop instance for user
     Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: enabled)
     Active: inactive (dead) since Fri 2023-03-10 04:48:04 -03; 4min 5s ago
    Process: 58249 ExecStart=/opt/google/chrome-remote-desktop/chrome-remote-desktop --start --new-session (code=exited, status=1/FAILURE)
   Main PID: 58249 (code=exited, status=1/FAILURE)

sudo journalctl -u chrome-remote-desktop@<user>.service

mar 10 04:28:35 <host_name> chrome-remote-desktop[8639]: Invalid MIT-MAGIC-COOKIE-1 keyxdpyinfo: unable to open display ":25".
mar 10 04:28:36 <host_name> chrome-remote-desktop[8671]: Invalid MIT-MAGIC-COOKIE-1 keyxdpyinfo: unable to open display ":25".
mar 10 04:34:10 <host_name> chrome-remote-desktop[46517]: Killing process 31788
mar 10 04:35:23 <host_name> chrome-remote-desktop[49840]: Invalid MIT-MAGIC-COOKIE-1 keyxdpyinfo: unable to open display ":50".
mar 10 04:35:24 <host_name> chrome-remote-desktop[49841]: Invalid MIT-MAGIC-COOKIE-1 keyxdpyinfo: unable to open display ":50".
mar 10 04:35:24 <host_name> chrome-remote-desktop[49847]: Invalid MIT-MAGIC-COOKIE-1 keyxdpyinfo: unable to open display ":50".

How could I increase "units loaded" by leaving all services "active" and 'running'?

best

1 Answer 1

0

Yes systemd has a default limit of 32 units that can be loaded at once, you can fix that by modifying the DefaultTasksMax setting in the systemd configuration file.

go to /etc/systemd/system.conf

search DefaultTasksMax and put it to infinity like that DefaultTasksMax=infinity

then reload systemctl sudo systemctl daemon-reload it should work

12
  • I'm curious how you established the value of 32 units here? How exactly is that related to the DefaultTasksMax value (which appears to be DefaultTasksMax=15% in the default /etc/systemd/system.conf file). The documentation suggests it's expressed as a percentage of the /proc/sys/kernel/pid_max value, giving a "default default" of 0.15 x 32768 = 4915 even on a 32-bit system. Is this really the max number of units, or is it the max number of tasks that an individual unit may create? Commented Mar 9, 2023 at 19:10
  • It just was the value on the VM I was on
    – Saxtheowl
    Commented Mar 9, 2023 at 21:41
  • I made the suggested adjustment. All users appear as loaded, but after 32 loaded units, the rest are inactive and dead
    – Rafael
    Commented Mar 10, 2023 at 7:57
  • 1
    I put the journalctl return at the end of the question above
    – Rafael
    Commented Mar 10, 2023 at 22:15
  • 1
    I think your problem is a ressources limit like memory or CPU running out of availability or a dependencies one which will force the system to mark your units as inactive or dead, maybe chrome need a ressources that can be opened more than 32 times ? you should check dmesg too
    – Saxtheowl
    Commented Mar 11, 2023 at 0:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .