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