Comments (10)
The channel argument to change the client idle timeout is grpc.client_idle_timeout_ms
, not grpc.idle_timeout_ms
. That's why it uses the default value in your test.
This is a bug caused specifically by the unix:
URL scheme, which is why we didn't catch it before. The fix for that bug is in #2750, and I will publish that soon.
from grpc-node.
@murgatroid99 I have done the below options
const keepAliveOptions = {
'grpc.client_idle_timeout_ms': 31536000000, // One year in milliseconds
'grpc.keepalive_time_ms':31536000000,
'grpc.keepalive_timeout_ms': 31536000000,
'grpc.keepalive_permit_without_calls':1,
}
Now unary calls are working fine but streaming is not working until I refresh the my application.
from grpc-node.
What do you mean "streaming is not working"? What actual problem are you experiencing?
Also, the bug has been fixed, so you should upgrade to @grpc/[email protected]
and revert the grpc.client_idle_timeout_ms
setting. I also recommend setting more useful keepalive settings, now that we know that keepalives are not the cause of the problem. 1 minute is a reasonable value for the keepalive time, and 20 seconds is the default value for the keepalive timeout.
from grpc-node.
@murgatroid99 Just now upgraded to @grpc/[email protected] and checking on it .
Initial problem:
My client is idle for sometime like almost 1 hour and after that if I make Grpc call to the server then it is not happening , and to make it work I need to restart my client then only it is working again.
After some Changes:
I have added the below configurations for keep alive and after this if client is idle for 1 hour then I am not able to receive any streaming calls data.
const keepAliveOptions = {
'grpc.client_idle_timeout_ms': 31536000000, // One year in milliseconds
'grpc.keepalive_time_ms':31536000000,
'grpc.keepalive_timeout_ms': 31536000000,
'grpc.keepalive_permit_without_calls':1,
}
Note: I am using the named Pipe communication.
How can I make my client alive until the server is down ... ? My client calls needs to work until the grpc server is down.
from grpc-node.
I suggest that you try the following configuration
const keepaliveOptions = {
'grpc.keepalive_time_ms': 60000
}
with all of the other options unset.
from grpc-node.
@murgatroid99 Thanks for your inputs . I will close this once everything is working fine on my end after testing with recent upgrade of grpc.
from grpc-node.
Upgraded to @grpc/[email protected] and I made Client 30 minutes IDLE and then tried to call the server grpc method, but it is not giving any response . After calling I am showing modal popup on UI and it struck there only. I do not know how to make client calls alive until the grpc server is down.
I have done following configurations as you mentioned.
const keepaliveOptions = {
'grpc.keepalive_time_ms': 60000
}
I want my client to remain active even if it's idle for a day or two without any calls. It should be ready to make calls whenever I trigger the gRPC server methods.
Temporary solutions I found:
- Client need to reconnect to the Server
2.Server should restart once without restarting the client
By making above changes everything works well again.
from grpc-node.
I think we need more information to determine what is causing this problem. Can you run your client and server with the environment variables GRPC_TRACE=all
and GRPC_VERBOSITY=DEBUG
, perform the test that results in this problem, and share the output?
from grpc-node.
@murgatroid99 sure will do that and update here.
from grpc-node.
@murgatroid99 This has been tested and working fine . Thanks for all the quick response. Happy coding.
from grpc-node.
Related Issues (20)
- Unable to use google.protobuf.Struct with @grpc/grpc-js HOT 1
- can we provide a detailed tutorial of grpc-js-xds? HOT 1
- How to capture gRPC keep alives with tcpdump? HOT 2
- not sure why i'm seeing grpc blocking the event loop so often HOT 4
- if the message has an optional field with a return value, the proto will attach a same name field with `_` prefix. why? HOT 2
- TypeError: The "original" argument must be of type Function | @grpc/grpc-js/build/src/resolver-dns.js HOT 3
- Exposing connection error reasons (ie, TLS failures) HOT 3
- Clarify build steps for v10+ HOT 2
- Discussion: Why HTTP2 pseudo headers such as :authory are removed from Metadata HOT 2
- Deadline examples/docs could use clarification HOT 8
- When response stream includes messages and then an error, final message(s) can be dropped HOT 1
- Servers base64-encode “grpc-status-details-bin” header with padding, but should be unpadded HOT 1
- Server does not check the HTTP method of the request HOT 2
- Compression handling has some issues
- Cardinality violations should use error code “unimplemented” HOT 3
- Servers send grpc-message trailer even when no error HOT 1
- successful calls still emit 'cancelled' as of v1.10.x HOT 2
- grpc-loader: Expose field options HOT 3
- `@grpc/grpc-js@latest` is pointing to an old version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grpc-node.