Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8365845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:45:38+00:00 2026-06-09T12:45:38+00:00

I have a program to read some RSS feeds, parse them, and copy the

  • 0

I have a program to read some RSS feeds, parse them, and copy the links somewhere else. Well! I want to check the RSS feeds about every 10 minutes for probable updates. I wrote this piece of code:

   @Override
public void run() {
    while (true) {
        // check feeds here
        try {
            Thread.sleep(600000);
        } catch (InterruptedException ex) {
            // exception handing
        }
    }
}

When I run it, for a day or two, it’s OK and running. But usually after 3 or 4 days, it goes to sleep and never wakes up again!!! So it doesn’t update the RSS feeds.

How can I solve this issue!?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T12:45:39+00:00Added an answer on June 9, 2026 at 12:45 pm

    If I have to guess I would say there’s probably a bug in the code that reads the feeds which raises an unhandled exception which in turn ends the thread. To you it seems like the thread never wakes, when in fact it dies.

    public void run() {
        while (true) {
            // check feeds here   <<<---- Look for the bug here
            try {
                Thread.sleep(600000);
            } catch (InterruptedException ex) {
                // exception handing
            }
        }
    }
    

    It’s very unlikely that there’s a bug in the Thread.sleep method (as it is widely use almost everywhere). Anyway, debug and check to see if your thread is still alive or if it has died.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a situation where I want my program to read in some numbers
I have a program that should read from a file.It reads some amount of
I have a Java program that needs to read from some file. The file
I have c# program , and one file from where it read-write some info.
I have a c program that is trying to read in a file. Using
My program needs to read csv files which may have 1,2 or 3 columns,
Im writing a program that should read input via stdin, so I have the
i have to write a program in C to read a file containing several
i have been trying to write a program in python to read two text
So I have the following read and write file program for an Array. How

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.