linagora / tmail-backend

GNU Affero General Public License v3.0
39 stars 22 forks source link

[Bug] DriverTimeoutException at CassandraBlobStoreCache #483

Closed vttranlina closed 1 year ago

vttranlina commented 2 years ago

When I run webadmin task rspamd learnSpam, I saw the error from log

{
    "timestamp": "2022-10-04T08:36:59.876Z",
    "level": "WARN",
    "thread": "s1-timer-0",
    "logger": "org.apache.james.blob.cassandra.cache.CassandraBlobStoreCache",
    "message": "Fail reading blob store cache",
    "context": "default",
    "exception": "com.datastax.oss.driver.api.core.DriverTimeoutException: Query timed out after PT0.5S\n\tat com.datastax.oss.driver.internal.core.cql.CqlRequestHandler.lambda$scheduleTimeout$1(CqlRequestHandler.java:207)\n\tat io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:715)\n\tat io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34)\n\tat io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:703)\n\tat io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:790)\n\tat io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:503)\n\tat io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\n\tat java.base/java.lang.Thread.run(Unknown Source)\n"
}
chibenwa commented 2 years ago

Should help ! https://github.com/apache/james-project/pull/1229

vttranlina commented 2 years ago

Should help ! apache/james-project#1229

I tried to use that commit on preprod, and the error is not fixed

chibenwa commented 2 years ago

Try reduce parralelism a bit more.

Flatmap in flatmap in flatmap likely means way too much cassandra requests.

We can concider using concatmap in some places there too...