Giter Club home page Giter Club logo

Comments (8)

miketeo avatar miketeo commented on June 21, 2024

You are correct in your assessment. That status code looks like it can be handled in a more user-friendly manner.
But I'm interested to learn what can lead to this status code. After all, it does not appear to a common scenario when the remote service will simply delete the user session. If an incorrect UID is sent, then there could be a bug lurking somewhere in the code.

from pysmb.

thomasleveil avatar thomasleveil commented on June 21, 2024

well, I don't really know. I found this error in our newly installed Sentry. I can't tell yet how frequently this happens. I'll remember to update here if it is the case.

My best guess is that it could be a restart of the service.

from pysmb.

thomasleveil avatar thomasleveil commented on June 21, 2024

This error occurred again today. Unfortunately, I cannot reproduce it consistently and can't figure out why it occurs

from pysmb.

thomasleveil avatar thomasleveil commented on June 21, 2024

it happened again today

from pysmb.

miketeo avatar miketeo commented on June 21, 2024

@thomasleveil : Can you provide a few details about your task?

  1. Are you using one pysmb session to perform multiple file uploads/downloads?
  2. Does the error occur on the first file upload/download? If it happens like after a dozen operations, I suspect there could be some form of connection throttling.
  3. If possible, can you log some info of each file operation in terms of file size and duration of each upload/download? When the error occurs next time, is there any abnormal trends in that current upload/download operation? For instance, larger file size, prolonged duration, etc.

from pysmb.

thomasleveil avatar thomasleveil commented on June 21, 2024

Thanks @miketeo for the attention. Next time it happens I'll will take a closer look at operations the code is trying to run.

Would you recommend opening a new connection for each individual operation ?

from pysmb.

thomasleveil avatar thomasleveil commented on June 21, 2024

@miketeo, I've got another occurrence this morning. Looking at the code, we can have up to 5 calls triggered at the same time, in different threads.
Each call will :

  1. connect & auth to smb
  2. for path in [<list of 4 dir paths>]: recursive call to conn.listPath(...)

One of the calls is failing at connection time

from pysmb.

miketeo avatar miketeo commented on June 21, 2024

I suspect that you might be opening "too many" connections at one time. I had similar occurrences when I run the full regression test suites against a Windows 10 workstation.

I'm assuming each pysmb connection is running in its own thread.
A possible workaround could be to catch the exception and introduce a couple of seconds delay before reconnecting again in your step 1.

from pysmb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.