Repository navigation
Security handshake failed - long queries ( > 2 secs) (nodejs client) #1905
Description
Activity
We've seen the same types of logs leaked from core as well (in
google-cloud-python)- addedtype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.
on Jan 9, 2017 grpc/grpc#8839 -- maybe we need to configure a back-off setting when we open a gRPC channel:
grpc.initial_reconnect_backoff_ms.@jmuk any thoughts on if we should set this value to a higher number for Speech? Or more generally for the other APIs / from another place in the code (gax)?
Oh, I didn't know the third parameter to the constructors.
I don't think this is specific to certain APIs, rather I guess it would be up to the connection between user's environment and the google servers. But yeah, setting some default reconnection_backoff (like 10000) on gax makes sense (also possibly the autogen layer should accept customization of these values).I am also wondering:
- what would be the best value in this case?
- are there any drawbacks when the value gets bigger?
@murgatroid99 would know the answers, I guess?
Ping @murgatroid99
Sorry, I don't know the answers to those questions
In that case, let's leave this value as-is, unspecified.
When #1991 is fixed, users can specify the parameters by themselves.PR sent: #2007, however I specified it as 5000ms instead of the default 1000ms. Users have been having success with 10000ms, but to play it safe, I went in the middle. Happy to set it to any value you think is appropriate.
- added 2 commits that reference this issue
on Feb 21, 2017 - added a commit that references this issue
on Jul 23, 2025 - added a commit that references this issue
on Oct 22, 2025 - added a commit that references this issue
on Feb 25, 2026 - added a commit that references this issue
on Mar 18, 2026
From @vvzen on January 6, 2017 14:33
Using the google-cloud package, node v 6 and npm-4.0.5 on my local macOS machine (10.11.6).
When performing a query to the datastore sometimes the database would spit it out Security Handshake failed logs (more frequently just after rebooting my express server).
After some seconds (3-4), the query is finally resolved.
The errors all look like this:
E0106 15:08:31.210244000 123145321271296 handshake.c:128] Security handshake failed: {"created":"@1483711711.210211000","description":"Handshake read failed","file":"../src/core/lib/security/transport/handshake.c","file_line":237,"referenced_errors":[{"created":"@1483711711.210204000","description":"FD shutdown","file":"../src/core/lib/iomgr/ev_poll_posix.c","file_line":427}]}Here's a screenshot (after running a query to check if a user existed) :

Copied from original issue: googleapis/google-cloud-datastore#156