Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure Jupyter server to kill Python kernels after 12 hours (#394)
When a Jupyter notebook server loses a connection to the front end, it keeps the messages in a buffer. If there is a background thread running and trying to update the front end, the buffer grows indefinitely, eventually consuming all available RAM. See aiidalab/issues#13 for detailed analysis. Moreover, it will leave the python kernel running indefinitely which needlessly consumes resources. We could turn this behavior off by `setting buffer_offline_messages=False`, but that may come with other problems for people with flaky internet connections. Instead, here we configure Jupyter to kill all kernels that have been alive for more than 12 hours. We also close all inactive terminals after 10 minutes.
- Loading branch information