Skip to content

gun_http:timeout/3 not exported/existent #357

@humaite

Description

@humaite

One of our server is randomly reporting this kind of issues when some servers are very long to answer:

2025-08-11T04:28:40.960219+00:00 [error] supervisor:do_restart/3:759 Supervisor: {local,gun_conns_sup}. Context: child_terminated. Reason: {undef,[{gun_http,timeout,[{http_state,#Port<0.30942910>,gun_tcp,#{keepalive => 60000,closing_timeout => 15000},'HTTP/1.1',keepalive,<<>>,undefined,[],head,{0,0},head},inet,#Ref<0.3105060779.3738173442.127861>],[]},{gun,handle_common_connected,4,[{file,"_build/default/lib/gun/src/gun.erl"},{line,1568}]},{gen_statem,loop_state_callback,11,[{file,"gen_statem.erl"},{line,1395}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,241}]}]}. Offender: id=gun,pid=<0.149597770.0>.

The line impacted is:

handle_common_connected(info, {timeout, TRef, Name}, _,
                State=#state{protocol=Protocol, protocol_state=ProtoState}) ->
        Commands = Protocol:timeout(ProtoState, Name, TRef),
        commands(Commands, State);

It seems gun_http:timeout/3 function was not created nor exported, then, this piece of code is crashing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions