vegabook

vegabook

How to set a longer timeout on elixir grpc

I’m getting a timeout error in my (10-second or so long-running) grpc call over the internet:

{:error, %GRPC.RPCError{status: 4, message: “Deadline Exceeded”, details: nil}}

Here is the call. I’ve tried, both timeout and deadline, nothing works.

def intradayBarRequest(topic,
chan,
interval \ 60,
start_dtime \ date_back(DateTime.utc_now(), 6, :month),
end_dtime \ DateTime.utc_now()) do
sts = %Google.Protobuf.Timestamp{seconds: start_dtime |> DateTime.to_unix}
dbg(sts, label: :sts)
ets = %Google.Protobuf.Timestamp{seconds: end_dtime |> DateTime.to_unix}
dbg(ets, label: :ets)
tpc = %Bloomberg.IntradayBarRequest{topic: topic, start: sts, end: ets, interval: interval}
dbg(tpc, label: :tpc)
deadline = DateTime.add(DateTime.utc_now(), 60, :second) # 60 seconds
#Bloomberg.Bbg.Stub.intraday_bar_request(chan, tpc, metadata: [timeout: 60])
Bloomberg.Bbg.Stub.intraday_bar_request(chan, tpc, metadata: [deadline: deadline])
end

You can see where I setup the channel here.

Any ideas how to increase deadlines to this doesn’t happen?

Most Liked

vegabook

vegabook

ooops channel link in my previous message broken. Here’s the code:

Where Next?

Popular in Questions Top

bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
dokuzbir
Hello, I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these buyer = %{ id: ...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
gonzofish
I’m currently trying to understand how to join three tables using Ecto. All the examples I’ve seen use 2, so maybe I’m just missing somet...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 35421 110
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New

We're in Beta

About us Mission Statement