Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to restart jupyter server frequently #74

Open
nileshvd opened this issue Jan 13, 2025 · 4 comments
Open

Need to restart jupyter server frequently #74

nileshvd opened this issue Jan 13, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@nileshvd
Copy link

Tested in SageMaker JupyterLab

Installed the extension, and kept the tab open. After some time (most likely after some kind of session timeout) S3 browser stopped showing S3 contents. Restarting jupyter server fixes the issue, but this should not be necessary

Expected
No need to restart jupyter server

@DenisaCG DenisaCG added the bug Something isn't working label Jan 14, 2025
@nileshvd
Copy link
Author

I think this is caused by session token being generated when the jupyter server starts and that it never gets refreshed. Reference: https://github.com/QuantStack/jupyter-drives/blob/main/jupyter_drives/base.py#L76

@ellisonbg
Copy link
Contributor

For extensions that have a server component like this, a single server restart is required. Are you saying that additional server restarts are needed?

@gogakoreli
Copy link
Contributor

gogakoreli commented Feb 5, 2025

This requires additional server restart, if the app has been running for a long time the auth session times out but the S3Driver still holds the outdated auth session. I observed 500 error response and the UI is empty, user can't even tell whats happening, I created the issue #75 for the UX part of it:

Error

{
"error": "Traceback (most recent call last):\n File "/opt/conda/lib/python3.11/site-packages/tornado/web.py", line 1790, in _execute\n result = await result\n ^^^^^^^^^^^^\n File "/opt/conda/lib/python3.11/site-packages/jupyter_drives/handlers.py", line 68, in get\n result = await self._manager.list_drives()\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/opt/conda/lib/python3.11/site-packages/jupyter_drives/manager.py", line 124, in list_drives\n results += drive.list_containers()\n ^^^^^^^^^^^^^^^^^^^^^^^\n File "/opt/conda/lib/python3.11/site-packages/libcloud/storage/base.py", line 302, in list_containers\n return list(self.iterate_containers())\n ^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/opt/conda/lib/python3.11/site-packages/libcloud/storage/drivers/s3.py", line 330, in iterate_containers\n raise LibcloudError("Unexpected status code: %s" % (response.status), driver=self)\nlibcloud.common.types.LibcloudError: <LibcloudError in <libcloud.storage.drivers.s3.S3StorageDriver object at 0x7f4107758910> 'Unexpected status code: 400'>\n"
}

Screenshot

Image

@gogakoreli
Copy link
Contributor

gogakoreli commented Feb 5, 2025

As a solution, at the very least we should try to reload the S3Driver credentials (https://github.com/QuantStack/jupyter-drives/blob/main/jupyter_drives/base.py#L76) if we receive this specific error in the server. Right now we are only doing it once during the initialization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants