-
Notifications
You must be signed in to change notification settings - Fork 163
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
Getting intermittent ProtocolError: No protocol version header #168
Comments
As a workaround, I've wrapped all my calls in a try, catch block with retries. It's conceptually similar to the
UPDATE: P.S. I am using a pool of size 32 which is shared amongst 20 processes. The operations are read and write intensive. |
whoo wait wait wait. SHARING a pool between processes? that is not possible. it is supposed to be thread-safe but tcp sockets cannot be shared between processes. try using a pool of size 1 (yes, one) per single-threaded process. |
I think you are right. That explains why it happens only on some of the apps. The apps that are single threaded works great. All the other multi process apps encounter this issue. |
if you're feeling adventurous you could open a pr that makes the pool remember the |
This saved everything. I made sure that all happybase connection are setup after the process is forked. And it worked like a charm. On another note, I also encountered similar stuff with my django + uwsgi app. So i just set the The patch sounds like a great idea to help prevent such "accidents". I'd be working on it coming few weeks. |
great to hear your issue is solved! |
My Happybase version is 1.1.0, Hbase 1.1.2, Python 2.7.12. Sometimes while performing scan or put on table I get
ProtocolError: No protocol version header
. I see this error intermittently. The execution happens for like 1000s of time and then it crashes with below trace:My
put_data
function makes use of the connection pool as follows. However I am using AutoRetryPool (this version) to avoid a lot of socket errors that I'd been encountering earlier. Thetimeout
param isNone
.The stacktrace with scan goes like below
I've already looked at #161 and I don't have those settings in my hbase-site.xml. I can not try with older version of happybase because we use
reverse
param at a lot of places. That does not seem to be supported in 0.9. Any suggestions is highly appreciated !!The text was updated successfully, but these errors were encountered: