aspose file tools*
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
Author

Java Application Stuck

Sunil Baboo
Greenhorn

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 ?


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

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

How many Threads are you using?

Bill

Java Resources at www.wbrogden.com
Sunil Baboo
Greenhorn

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
Greenhorn

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: http://aspose.com/file-tools
 
subject: Java Application Stuck
 
Similar Threads
Logging runtime exceptions
�The handle is invalid� when running .net console via java
Starting a process and using STDIN/STDOU/STDERR
Break out/hot key for Linux
No console window when running manifest file?