Coder Social home page Coder Social logo

Program still crashes about sneakpeek HOT 12 CLOSED

fterh avatar fterh commented on June 5, 2024
Program still crashes

from sneakpeek.

Comments (12)

fterh avatar fterh commented on June 5, 2024

This is happening very frequently now. I suspect it's to do with the read/write operations to the database file... perhaps now that the database file is growing larger in file size, read/write ops take longer and result in simultaneous accesses...?

Complete hunch. I'll look at this next week when I'm freer.

from sneakpeek.

fterh avatar fterh commented on June 5, 2024

@yleong @xlanor I've been looking at main.py, and I'm wondering...

I'm catching the exception at line 24 except Exception as e:, as can be seen in the "log file": Exception occurred while scanning. Since the exception has been properly caught and handled, why does the Python process crash?

from sneakpeek.

yleong avatar yleong commented on June 5, 2024

I'm not sure either, the exception handler at main.py:24 should have caught any exception in scan. I have just noticed that DatabaseManager.disconnect and the praw instantiation are not covered by the exception handler. Could the crashes be due to those lines? Can you share more crash logs if available? Maybe we can consider integrating with sentry.io rollbar so that we all can be notified of crashes and examine the exceptions. Or the graylog cluster would work too.

from sneakpeek.

xlanor avatar xlanor commented on June 5, 2024

Definitely, I'm currently tied down by my schedule but I can assist. my graylog cluster is still up, should we move the discussion to slack/gitter?

from sneakpeek.

yleong avatar yleong commented on June 5, 2024

Sure. Do we have one setup?

from sneakpeek.

fterh avatar fterh commented on June 5, 2024

@yleong No worries, I read the documentation for the schedule library, and turns out it's that. When an exception bubbles up in a thread task, it breaks the scheduler, so even though it was caught and handled in main.py, the scheduling thing breaks. The fix is documented here: https://schedule.readthedocs.io/en/stable/faq.html#what-if-my-task-throws-an-exception

@xlanor Yup, let's do that. You have my Telegram handle. No rush on the graylog cluster, I can push out a fix for the exception handling thing by the end of the week as perhaps v0.6.0-beta, and when graylog is up we can move to v1.0.

from sneakpeek.

changhuapeng avatar changhuapeng commented on June 5, 2024

@fterh If my understanding is correct, the Schedule library is used in this project to only scan for new submissions on the subreddit. Maybe you will want to replace the Schedule library with PRAW's own method of monitoring new submissions if the scheduling part is really causing all the crashes.

from sneakpeek.

fterh avatar fterh commented on June 5, 2024

@fterh If my understanding is correct, the Schedule library is used in this project to only scan for new submissions on the subreddit. Maybe you will want to replace the Schedule library with PRAW's own method of monitoring new submissions if the scheduling part is really causing all the crashes.

That's super cool, never knew about that! Will give it a read, thanks :)

from sneakpeek.

xlanor avatar xlanor commented on June 5, 2024

@changhuapeng @yleong , we are getting a slack channel up and going for anyone to join and discuss about sneakpeak.
slack

Feel free to join!

from sneakpeek.

fterh avatar fterh commented on June 5, 2024

@yleong I've pushed out 0.6.0-beta that uses Praw's mechanism for monitoring a subreddit. So far so good, will monitor for a bit and close this issue if it seems to work.

@xlanor for 1.0, since this issue is (hopefully) fixed already, I'm thinking we do logging and refactoring.

from sneakpeek.

xlanor avatar xlanor commented on June 5, 2024

@fterh

Sounds good. I'm wondering if you'd also like to automate the deployment process via travis, which is free for open source repositories. Part of my job scope at work involves setting up a deployment pipeline and infrastructure.

Maybe you can open a travis integration to this repository first as preparation, once my holidays roll around next month I'll definetly be more involved

from sneakpeek.

fterh avatar fterh commented on June 5, 2024

Sure. I'm familiar with Travis, but I'd thought that it was unnecessary because I originally envisioned this to be a minimal maintenance/development project in the sense that once the handlers are up and running, it shouldn't require any form of maintenance or development.

Looks like that plan got slightly thwarted :P But I agree that CI/CD is a good v1.0 milestone. Do you want to create a new issue for that? I'm closing this.

from sneakpeek.

Related Issues (17)

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.