File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes Java Application Stuck Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Java Application Stuck" Watch "Java Application Stuck" New topic

Java Application Stuck

Sunil Baboo

Joined: Aug 12, 2010
Posts: 16
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.

ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Can you post some part of code so that we can get some idea from it ?

Ujjwal B Soni <baroda, gujarat, india> <+918866008962>
"Helping hands are better than praying lips......"
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
How do you provide for a URL that is very slow in responding?

How many Threads are you using?

Sunil Baboo

Joined: Aug 12, 2010
Posts: 16
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

Joined: Aug 12, 2010
Posts: 16
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/
I agree. Here's the link:
subject: Java Application Stuck
It's not a secret anymore!