Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bindFailure exception on http client #170

Open
gedaiu opened this issue Aug 2, 2019 · 1 comment
Open

bindFailure exception on http client #170

gedaiu opened this issue Aug 2, 2019 · 1 comment

Comments

@gedaiu
Copy link
Contributor

gedaiu commented Aug 2, 2019

I am making http client requests inside a while(true) loop and after a minute I start getting these exceptions:

Failed to send request to: http://127.0.0.1:6000/test object.Exception@../../../../.dub/packages/vibe-core-1.6.2/vibe-core/source/vibe/core/net.d(223): Failed to connect to 127.0.0.1:6000: bindFailure
----------------
/usr/include/dmd/phobos/std/exception.d:515 pure @safe void std.exception.bailOut!(Exception).bailOut(immutable(char)[], ulong, scope const(char)[]) [0x865792]
/usr/include/dmd/phobos/std/exception.d:436 pure @safe bool std.exception.enforce!().enforce!(bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) [0x86570e]
../../../../.dub/packages/vibe-core-1.6.2/vibe-core/source/vibe/core/net.d:223 @trusted vibe.core.net.TCPConnection vibe.core.net.connectTCP(vibe.core.net.NetworkAddress, vibe.core.net.NetworkAddress, core.time.Duration).__lambda5() [0xa5d012]
../../../../.dub/packages/vibe-core-1.6.2/vibe-core/source/vibe/core/net.d:196 @safe vibe.core.net.TCPConnection vibe.core.net.connectTCP(vibe.core.net.NetworkAddress, vibe.core.net.NetworkAddress, core.time.Duration) [0xa5ce05]
../../../../.dub/packages/vibe-d-0.8.5/vibe-d/http/vibe/http/client.d:638 @safe bool vibe.http.client.HTTPClient.doRequest(scope void delegate(vibe.http.client.HTTPClientRequest), ref bool, bool, std.datetime.systime.SysTime) [0x93de34]
../../../../.dub/packages/vibe-d-0.8.5/vibe-d/http/vibe/http/client.d:547 @safe bool vibe.http.client.HTTPClient.doRequestWithRetry(scope void delegate(vibe.http.client.HTTPClientRequest), bool, out bool, out std.datetime.systime.SysTime) [0x93d9a2]
../../../../.dub/packages/vibe-d-0.8.5/vibe-d/http/vibe/http/client.d:481 @trusted void vibe.http.client.HTTPClient.request(scope void delegate(scope vibe.http.client.HTTPClientRequest), scope void delegate(scope vibe.http.client.HTTPClientResponse)) [0x93d369]
source/gis_collective/hmq/push_collection.d:87 nothrow bool gis_collective.hmq.push_collection.PushCollection.handleData(immutable(char)[], vibe.data.json.Json) [0x8b2d35]
source/gis_collective/hmq/http_push.d:108 nothrow void gis_collective.hmq.http_push.HttpPush.handleItem(gis_collective.hmq.round_robin.RoundRobin!(immutable(char)[]).RoundRobin.Item, vibe.data.json.Json) [0x8b049e]
../../../../.dub/packages/vibe-core-1.6.2/vibe-core/source/vibe/core/task.d:558 void vibe.core.task.TaskFuncInfo.set!(void delegate(gis_collective.hmq.round_robin.RoundRobin!(immutable(char)[]).RoundRobin.Item, vibe.data.json.Json), gis_collective.hmq.round_robin.RoundRobin!(immutable(char)[]).RoundRobin.Item, vibe.data.json.Json).set(ref void delegate(gis_collective.hmq.round_robin.RoundRobin!(immutable(char)[]).RoundRobin.Item, vibe.data.json.Json), ref gis_collective.hmq.round_robin.RoundRobin!(immutable(char)[]).RoundRobin.Item, ref vibe.data.json.Json).callDelegate(ref vibe.core.task.TaskFuncInfo) [0x8a1c94]
../../../../.dub/packages/vibe-core-1.6.2/vibe-core/source/vibe/core/task.d:579 void vibe.core.task.TaskFuncInfo.call() [0xa71e1d]
../../../../.dub/packages/vibe-core-1.6.2/vibe-core/source/vibe/core/task.d:388 nothrow void vibe.core.task.TaskFiber.run() [0xa713b1]
??:? void core.thread.Fiber.run() [0xb48a2b]
??:? fiber_entryPoint [0xb488fe]
??:? [0xffffffffffffffff]
@s-ludwig
Copy link
Member

s-ludwig commented Jul 27, 2024

I'm wondering whether the HTTPClientResponse objects are fully processed or maybe are left dangling. The callback based version of requestHTTP should clean up the response synchronously, but when using the one that returns a HTTPClientResponse, the caller needs to make sure to fully read or drop the response body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants