• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Java Application Stuck

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had web crawler java application that continuously run on do-while loop. Application run fine, accomplishing several loop. After completing several number of loop, java application get stuck. Stuck in sense that Application process is running but application output on terminal/console remain unchanged. There is no any specific place such stuck situation happen, it happen at any situation such as sometime while parsing html, sometime while opening url, sometime while downloading file and so on. Even there will be no exception and error message on terminal/console.

All i am doing now is kill current running process and start application again. This is hectic to me. Can anyone tell me why is that happening.

Also, in my application, in order to reclaim used resource, i that implemented Thread sleep for 5sec, 10sec and so on.

Thank you for your time and consideration.

 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post some part of code so that we can get some idea from it ?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do you provide for a URL that is very slow in responding?

How many Threads are you using?

Bill
 
Sunil Baboo
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Each URL will be provided from external file (plain text file). Actually application read Directory define on path. These directory contains those external file corresponding to each URL.

I had tested application with Netbean profiler, its has shown 3 Thread on use.

 
Sunil Baboo
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had developed external launcher program that watch console output for specific interval of time. During period of watch if console output is same as it has previously watched, program assume it was stuck so it kill the process and restart it. Till now it is doing sensible work/
 
reply
    Bookmark Topic Watch Topic
  • New Topic