LAW-Unimi / BUbiNG

The LAW next generation crawler.
http://law.di.unimi.it/software.php#bubing
Apache License 2.0
85 stars 24 forks source link

ParsingThread blocked by jgroups #12

Closed guillaumepitel closed 6 years ago

guillaumepitel commented 6 years ago

Hi, so as often, I've had this problem where the crawl slows down until nothing happens anymore. A threadDump shows this : `"ParsingThread-63" #41669 daemon prio=3 os_prio=0 tid=0x00007f71c03bb800 nid=0x7a97 runnable [0x00007f7514b09000] java.lang.Thread.State: TIMED_WAITING (parking) at jdk.internal.misc.Unsafe.park(java.base@9.0.1/Native Method)

I will try to identify if this is happening as soon as the crawl slows down, since the slowdown started before I noticed jgroups-related issues, but it may be at least interesting to have a non-blocking file-backed queue for the URL submission process.

vigna commented 6 years ago

It happened to us too, but the best we could do was to submit the stack trace to the JGroup author, who didn't do much with it. After the third-from-bottom line, it's no longer us: at some point JGroup gets stuck.

guillaumepitel commented 6 years ago

After a little digging, FC is the flow control mecanism in JGroups that handle backpressure to avoid keeping sending message faster than the receiver can handle them. So I guess it boils down to JGroups configuration. My configuration is probably not optimal. However, I still think it's a bad idea to make the ParsingThread potentially blocking. Especially since just one overwhelmed receiver can easily block all ParsingThreads, which can have cascading effects for other receivers.

vigna commented 6 years ago

Mmmhhhh... I'm thinking. Maybe the receiver is flushing. So it locks for minutes. And then it never recovers. Do you see something like this from the logs?