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

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
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
Kurisu
For example for a current url like http://localhost:4000/cosmetic/products?_utf8=✓&amp;query=perfume&amp;page=2, I would like to get: ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
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
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
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

sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 42842 311
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
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
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30840 112
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
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
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

We're in Beta

About us Mission Statement