hectorsq

hectorsq

Read_only problem with HTTP client

Hi,

I’ve developed a Phoenix application that functions as a REST to SOAP converter. Instead of using a SOAP client package, I’ve implemented it using pure HTTP.

The application receives a JSON message from the client approximately every two seconds, converts it to XML, and forwards it to a SOAP server (SAP).

I’m utilizing Req, which in turn utilizes Finch and Mint.

After successfully sending several hundred messages, I encounter the following errors:

%Finch.Error{reason: :read_only}

03:43:47.343 [error] #PID<0.3996.0> running ErpInterfaceWeb.Endpoint (connection #PID<0.3995.0>, stream id 1) terminated

Restarting my app, which is hosted on Fly.io, resolves the issue.

I’m unsure if there’s a problem with my application, if the external server is blocking me, or if there’s an issue with Finch.

I’ve researched the “read_only” error but haven’t found any useful information. I’m uncertain whether this signifies a problem within my app or with the external server.

I’m considering replacing Req with Tesla, hoping it might resolve the issue.

Any insights would be greatly appreciated.

Regards,
Hector Sansores

First Post!

dimitarvp

dimitarvp

According to a quick GitHub search, “the connection is closed for writing”. :thinking:

This file (the first of two matches in the GitHub search) has 26 matches of read_only, I’d go read it in more detail. (Some of the matches are actually in the symbols outline on the right but still, at least 15 matches in the file from what I’ve seen.)

And this file (the second match) implies that the server “has sent GOAWAY and then replies, we get the replies but are closed for writing” which might be I don’t know, rate limit hit? Or maybe you have inadvertently opened it in HTTP2 streaming mode without the option to write to the connection (as one of the code matches implies)?

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
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
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
hariharasudhan94
I would like to know what is the best IDE for elixir development?
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
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
chewm
Hi guys, nice to meet you to the whole forum, I’m new here, I’m trying to configure visual studio code for elixir, right now the intellis...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

Other popular topics Top

Tee
can someone please explain to me how Enum.reduce works with maps
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
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
AstonJ
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
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
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement