Systemdspawner memory limit kills the whole singleuser-service

I’m planning to move from sudospawner to systemdspawner to enforce memory limit in a more systematic way. In my testing I find that the when a kernel hits the memory limit the whole singleuser-server dies and needs to be restarted. In my opinion it would be better if only the offending kernel died. This is the behaviour I get in my current hacked together solution under sudospawner where I set the memory limit in the user.slice. Looking at dmesg it seems like the oom killer does the right thing and only kill the offending process, but singleuser-server dies along with it.

Any hints?

System details:
Rocky 9.1
Jupyterhub 3.1.0
systemdspawner 0.15
(using conda to install everything jupyter related)

Best regards

Found the problem, it is in systemd. Pull request to systemdspawner sent.