GithubHelp home page GithubHelp logo

Comments (4)

johnolafenwa avatar johnolafenwa commented on September 25, 2024

Hello @VorlonCD , thank you for sharing this. Have your tried restarting DeepStack? It appears DeepStack is unable to write its data to the AppData directory. This might be due to something on the windows end, probably an update. Restarting should fix this issue

from deepstack.

VorlonCD avatar VorlonCD commented on September 25, 2024

Yes, a restart of deepstack always fixes. I've seen 404 and 500 errors after it is running well for some time. I wonder if there is some resiliency that could be built in so the service restarts what it needs to get back on track after the error? A few theories why it might happen - 1) an abrupt disconnect in the middle of processing an image, 2) Windows cleans the TEMP folder and maybe it kills a temp file you expect to see?

from deepstack.

Tinbum1 avatar Tinbum1 commented on September 25, 2024

I've also seen the 500 error after running for about 2 days.

from deepstack.

VorlonCD avatar VorlonCD commented on September 25, 2024

@johnolafenwa - The attached update to detection.py does 2 things:

  • Fixes issue where python.exe would crash due to unhanded crash in a FINALLY block
  • Outputs actual exception message when the server returns error 500 - error occurred on the server. That way we get to see all the CUDNN_STATUS_ALLOC_FAILED and CUDA out of memory messages back in any program that reads the json ERROR property such as AITOOL. (latest commit, not released yet).

Detail:

I would commonly notice that Deepstack.exe did not have any spawned python.exe's's because they crashed.

As the STDERR.TXT shows:

File "C:\DeepStack\intelligencelayer\shared\detection.py", line 138, in objectdetection
os.remove(img_path)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Users\\Vorlon\\AppData\\Local\\Temp\\DeepStack\\83e9c5b0-d698-44f3-a8df-d19655d9f7da

So for some reason (perhaps because the temporary image file is still 'in use') the os.remove command here gives that error:

finally:
                    db.set(req_id, json.dumps(output))
                    if os.path.exists(img_path):
                        os.remove(img_path)

And the exception is not caught because it is in a FINALLY block so the py script crashes bubbye.

The solution in the attachment calls a SafeFileDelete function that ignores the exception if it happens.

To use, backup and replace this file with the one in the zip.
C:\DeepStack\intelligencelayer\shared\detection.py

detection.zip

`

from deepstack.

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.