Skip to content

Commit 59c9df1

Browse files
committed
show current rate limit values in rate limit messages
1 parent 5da6eb6 commit 59c9df1

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

notebook/services/kernels/handlers.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,12 @@ def write_stderr(error_message):
360360
The notebook server will temporarily stop sending output
361361
to the client in order to avoid crashing it.
362362
To change this limit, set the config variable
363-
`--NotebookApp.iopub_msg_rate_limit`."""))
363+
`--NotebookApp.iopub_msg_rate_limit`.
364+
365+
Current values:
366+
NotebookApp.iopub_msg_rate_limit={} (msgs/sec)
367+
NotebookApp.rate_limit_window={} (secs)
368+
""".format(self.iopub_msg_rate_limit, self.rate_limit_window)))
364369
else:
365370
# resume once we've got some headroom below the limit
366371
if self._iopub_msgs_exceeded and msg_rate < (0.8 * self.iopub_msg_rate_limit):
@@ -377,7 +382,12 @@ def write_stderr(error_message):
377382
The notebook server will temporarily stop sending output
378383
to the client in order to avoid crashing it.
379384
To change this limit, set the config variable
380-
`--NotebookApp.iopub_data_rate_limit`."""))
385+
`--NotebookApp.iopub_data_rate_limit`.
386+
387+
Current values:
388+
NotebookApp.iopub_data_rate_limit={} (bytes/sec)
389+
NotebookApp.rate_limit_window={} (secs)
390+
""".format(self.iopub_data_rate_limit, self.rate_limit_window)))
381391
else:
382392
# resume once we've got some headroom below the limit
383393
if self._iopub_data_exceeded and data_rate < (0.8 * self.iopub_data_rate_limit):

0 commit comments

Comments
 (0)