Git Product home page Git Product logo

Comments (14)

terry-xiaoyu avatar terry-xiaoyu commented on September 12, 2024

@ranr Sorry for late reply. Do you still have that problem now?

I would suspect that is not a issue of emq. The socket_closed_remotely error indicates emq was trying to send the request, but the peer closed the connection, probably because there was no process listening on port 80.

from emqx-auth-http.

ranr avatar ranr commented on September 12, 2024

from emqx-auth-http.

terry-xiaoyu avatar terry-xiaoyu commented on September 12, 2024

Hi, could you post your logs here? Including the emq's log, and the nginx's access/error log at the time the error occurred.

from emqx-auth-http.

NicoMechu avatar NicoMechu commented on September 12, 2024

Hi, I got the same issue (although I'm using Apache).
I suspect is my fault, but can't find the problem.
The server didn't go down either.

Regards,

from emqx-auth-http.

terry-xiaoyu avatar terry-xiaoyu commented on September 12, 2024

@NicoMechu How many users concurrently connected in your system? Did your problem occurred only when lots of connects flood in?

from emqx-auth-http.

NicoMechu avatar NicoMechu commented on September 12, 2024

@terry-xiaoyu Thanks for responding. I can't determinate a pattern for the error, but this doesn't happen only when there are lots of connects.

from emqx-auth-http.

ranr avatar ranr commented on September 12, 2024

from emqx-auth-http.

Leen15 avatar Leen15 commented on September 12, 2024

Hi to all, we have the same problem here with version 2.3.5:
image
we have only 3 clients connected and the acl server is on the same local network.
The first client sends a timestamp on the ping channel every 5 seconds.
The strange thing: if from another client I try to publish on the same channel, it works (Hello world messages):
image
after about a minute, the first client can publish again, without touch nothing.

from emqx-auth-http.

terry-xiaoyu avatar terry-xiaoyu commented on September 12, 2024

@Leen15 Hi, we're investigating this issue, as many guys have seen it.
Hope it get fixed in next release.

from emqx-auth-http.

Leen15 avatar Leen15 commented on September 12, 2024

Thanks @terry-xiaoyu . We would like to use emq in production but this bug stopped us because it happens every 10 minutes or less. :/
Do you have any ETA about the next release or could a hotfix / workaround be applied in the meanwhile?
Thanks for your great work!

from emqx-auth-http.

terry-xiaoyu avatar terry-xiaoyu commented on September 12, 2024

@Leen15 EMQ 2.3.7 would be released before next week, including the fix of this issue.
See the pull request here: #75

from emqx-auth-http.

Leen15 avatar Leen15 commented on September 12, 2024

Great, thanks!

from emqx-auth-http.

thanhhm avatar thanhhm commented on September 12, 2024

Happy new year,
It was pretty long but ran into httpc's problem too and had an investigation.
According to this guy ThomasArts, He use another profile for difference process. After reading httpc source code I have some though:

handle_request(Request, State = #state{options = Options}) ->
    NewRequest = handle_cookies(generate_request_id(Request), State),
    SessionType = session_type(Options),
    case select_session(Request#request.method,
			Request#request.address,
			Request#request.scheme, SessionType, State) of
	{ok, HandlerPid} ->
	    pipeline_or_keep_alive(NewRequest, HandlerPid, State);
	no_connection ->
	    start_handler(NewRequest, State);
	{no_session,  OpenSessions} when OpenSessions
	< Options#options.max_sessions ->
	    start_handler(NewRequest, State);
	{no_session, _} ->
	    %% Do not start any more persistent connections
	    %% towards this server.
	    NewHeaders =
		(NewRequest#request.headers)#http_request_h{connection
							    = "close"},
	    start_handler(NewRequest#request{headers = NewHeaders}, State)
    end,
    {reply, {ok, NewRequest#request.id}, State}.
  • When calling httpc:request but doesn't specifiy a profile mean you will use default profile and by default, each profile will have maximum 2 persistent connections per domain. If your application reach it, the httpc_manager doesn't start any more persistent connections so for further request, it just create then close the connection.
    => So more profile mean you will have more perstistent connetions and the application doesn't have to create-close connections consecutively so maybe it can fix the socket_closed_remotely

=> As I though, for simple we just need to increase the persistent connections option is okay.

from emqx-auth-http.

turtleDeng avatar turtleDeng commented on September 12, 2024

Thank you for your participation. The latest version already supports the retransmission mechanism.

from emqx-auth-http.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.