Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/java/org/apache/nutch/fetcher/Fetcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -448,16 +448,21 @@ else if (bandwidthTargetCheckCounter == bandwidthTargetCheckEveryNSecs) {
* fetcher.threads.timeout.divisor.
*/
if ((System.currentTimeMillis() - lastRequestStart.get()) > timeout) {
LOG.warn("Timeout reached with no new requests since {} seconds.",
LOG.warn(
"Timeout reached with no new requests since {} milliseconds.",
timeout);
LOG.warn("Aborting with {} hung threads{}.", activeThreads,
LOG.warn("Aborting with {} hung or idle threads{}.", activeThreads,
feeder.isAlive() ? " (queue feeder still alive)" : "");
hungThreadsCounter.increment(activeThreads.get());
for (int i = 0; i < fetcherThreads.size(); i++) {
FetcherThread thread = fetcherThreads.get(i);
if (thread.isAlive()) {
LOG.warn("Thread #{} hung while processing {}", i,
thread.getReprUrl());
if (thread.getReprUrl() != null) {
LOG.warn("Thread #{} hung while processing {}", i,
thread.getReprUrl());
} else {
LOG.warn("Thread #{} idle", i);
}
StackTraceElement[] stack = thread.getStackTrace();
StringBuilder sb = new StringBuilder();
sb.append("Stack of thread #").append(i).append(":\n");
Expand Down
3 changes: 3 additions & 0 deletions src/java/org/apache/nutch/fetcher/FetcherThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,9 @@ public void run() {
output(fit.url, fit.datum, null, ProtocolStatus.STATUS_FAILED,
CrawlDatum.STATUS_FETCH_RETRY);
}

// done: unset reprUrl for reporting
setReprUrl(null);
}

} catch (Throwable e) {
Expand Down
Loading