Keep notebook with uplink running in JupyterHub

What I’m trying to do:
The backend for anvil is running as a jupyter notebook within jupyter hub. I would like to configure jupyterhub to keep this notebook running (to keep the application up).
The notebook contains

anvil.server.connect('...')
import anvil.mpl_util
@anvil.server.callable
def ..

What I’ve tried and what’s not working:
I have tried disabling culling in jupyterhub configuration but that did not help.

sudo tljh-config set services.cull.enabled False

The notebook stops responding to anvil after some time.

are you running anvil.server.wait_forever() ?

Thanks, this was missing. However, it seems it was also necessary to reconfigure tljh with `tljh-config set services.cull.max_age 0’, which disabled a not documented(?) default limit for maximum run time of servers in tljh (see also Culling idle notebook servers — The Littlest JupyterHub documentation). Disabling culling was necessary but not sufficient.