Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERR Protocol error: invalid bulk length #318

Closed
shuttie opened this issue Mar 23, 2022 · 2 comments
Closed

ERR Protocol error: invalid bulk length #318

shuttie opened this issue Mar 23, 2022 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@shuttie
Copy link
Collaborator

shuttie commented Mar 23, 2022

When we rank too many items over too many features, the redis read request becomes too large:

20:20:22.701 ERROR org.http4s.server.service-errors - Error servicing request: POST /rank from 127.0.0.1
redis.clients.jedis.exceptions.JedisDataException: ERR Protocol error: invalid bulk length
        at redis.clients.jedis.Protocol.processError(Protocol.java:96)
        at redis.clients.jedis.Protocol.process(Protocol.java:137)
        at redis.clients.jedis.Protocol.read(Protocol.java:192)
        at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:316)
        at redis.clients.jedis.Connection.getOne(Connection.java:298)
        at redis.clients.jedis.Connection.executeCommand(Connection.java:123)
        at redis.clients.jedis.Jedis.mget(Jedis.java:818)
        at io.findify.featury.connector.redis.RedisStore.$anonfun$read$3(RedisStore.scala:47)
        at apply @ io.findify.featury.connector.redis.RedisStore.$anonfun$read$2(RedisStore.scala:47)
        at flatMap @ io.findify.featury.connector.redis.RedisStore.$anonfun$read$2(RedisStore.scala:47)
        at make @ ai.metarank.mode.inference.FlinkMinicluster$.resource(FlinkMinicluster.scala:13)
        at make @ ai.metarank.mode.inference.FlinkMinicluster$.resource(FlinkMinicluster.scala:13)
        at use @ ai.metarank.mode.inference.Inference$.$anonfun$run$4(Inference.scala:33)
        at flatMap @ ai.metarank.mode.inference.api.RankApi.$anonfun$rerank$2(RankApi.scala:34)
        at apply @ ai.metarank.mode.inference.api.RankApi.rerank(RankApi.scala:33)
        at flatMap @ ai.metarank.mode.inference.api.RankApi.rerank(RankApi.scala:33)
        at flatMap @ ai.metarank.mode.inference.api.RankApi$$anonfun$1.$anonfun$applyOrElse$1(RankApi.scala:25)
        at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:162)

So we should split such requests into smaller chunks and send them in parallel instead.

@vgoloviznin vgoloviznin added the bug Something isn't working label Mar 23, 2022
@shuttie
Copy link
Collaborator Author

shuttie commented Mar 23, 2022

Actually that's the main reason why demo was constantly failing on show-hn

@shuttie
Copy link
Collaborator Author

shuttie commented Mar 28, 2022

Fixed in #333

@shuttie shuttie closed this as completed Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants