Giter Site home page Giter Site logo

Comments (6)

KeanuLe avatar KeanuLe commented on May 18, 2024

ab -n 10000 -c 1000 http://192.168.2.3:8080/ <=== _FIXED_: #44, 10aba8f3117

Nginx reverse proxy:
ab -n 10000 -c 1000 http://192.168.2.3/ <=== _EXCEPTION!!!_
ab -n 10000 -c 1000 http://127.0.0.1/ <=== _EXCEPTION!!!_

upstream example_servers {
  server 127.0.0.1:8080;
}
server {
location / {
    try_files $uri @example;
}

location @example {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass       http://example_servers;
}
}
[B7167F80:B6B693C0 ERR] Error after page has been written: object.Exception@../source/vibe/core/drivers/libevent2_tcp.d(287): Operating on closed TCPConnection.
----------------
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(pure @safe bool std.exception.enforce!(bool, "../source/vibe/core/drivers/libevent2_tcp.d", 287).enforce(bool, lazy const(char)[])+0x2f) [0x80fb1fb]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.core.drivers.libevent2_tcp.Libevent2TcpConnection.write(const(ubyte[]), bool)+0x43) [0x80fa71f]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.stream.stream.OutputStream.write(const(char[]), bool)+0x3f) [0x80e0ebf]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.HttpServerResponse.writeHeader()+0x128) [0x80fd7b0]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(@property vibe.stream.stream.OutputStream vibe.http.server.HttpServerResponse.bodyWriter()+0x189) [0x80fd099]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.HttpServerResponse.writeBody(const(ubyte[]), immutable(char)[])+0x90) [0x80fcdfc]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void simplehttp.handleRequest(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)+0x29) [0x80d4069]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void std.functional.DelegateFaker!(void function(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)*).DelegateFaker.doIt(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)+0x45) [0x80f9135]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.handleHttpConnection(vibe.core.driver.TcpConnection, vibe.http.server.HTTPServerListener)+0xbea) [0x80fe652]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.listenHttpPlain(vibe.http.server.HttpServerSettings, void delegate(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)).void __lambda17(vibe.core.driver.TcpConnection)+0x27) [0x80fc7e3]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(extern (C) void vibe.core.drivers.libevent2_tcp.onConnect(int, short, void*).void delegate() client_task(vibe.core.drivers.libevent2_tcp.TcpContext*, vibe.core.drivers.libevent2_tcp.TcpContext*).void __lambda16()+0x8f) [0x80fadb7]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.core.core.defaultFiberFunc()+0x70) [0x80e3154]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void core.thread.Fiber.run()+0x19) [0x8146b49]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(fiber_entryPoint+0x49) [0x8146ae9]
[(nil)]
[B7167F80:B6B693C0 WRN] Handling of connection failed: Operating on closed TCPConnection.
[B7167F80:B6B693C0 ERR] Error after page has been written: object.Exception@../source/vibe/core/drivers/libevent2_tcp.d(287): Operating on closed TCPConnection.
----------------
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(pure @safe bool std.exception.enforce!(bool, "../source/vibe/core/drivers/libevent2_tcp.d", 287).enforce(bool, lazy const(char)[])+0x2f) [0x80fb1fb]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.core.drivers.libevent2_tcp.Libevent2TcpConnection.write(const(ubyte[]), bool)+0x43) [0x80fa71f]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.stream.stream.OutputStream.write(const(char[]), bool)+0x3f) [0x80e0ebf]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.HttpServerResponse.writeHeader()+0x128) [0x80fd7b0]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(@property vibe.stream.stream.OutputStream vibe.http.server.HttpServerResponse.bodyWriter()+0x189) [0x80fd099]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.HttpServerResponse.writeBody(const(ubyte[]), immutable(char)[])+0x90) [0x80fcdfc]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void simplehttp.handleRequest(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)+0x29) [0x80d4069]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void std.functional.DelegateFaker!(void function(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)*).DelegateFaker.doIt(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)+0x45) [0x80f9135]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.handleHttpConnection(vibe.core.driver.TcpConnection, vibe.http.server.HTTPServerListener)+0xbea) [0x80fe652]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.listenHttpPlain(vibe.http.server.HttpServerSettings, void delegate(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)).void __lambda17(vibe.core.driver.TcpConnection)+0x27) [0x80fc7e3]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(extern (C) void vibe.core.drivers.libevent2_tcp.onConnect(int, short, void*).void delegate() client_task(vibe.core.drivers.libevent2_tcp.TcpContext*, vibe.core.drivers.libevent2_tcp.TcpContext*).void __lambda16()+0x8f) [0x80fadb7]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.core.core.defaultFiberFunc()+0x70) [0x80e3154]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void core.thread.Fiber.run()+0x19) [0x8146b49]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(fiber_entryPoint+0x49) [0x8146ae9]
[(nil)]
[B7167F80:B6B693C0 WRN] Handling of connection failed: Operating on closed TCPConnection.

from vibe.d.

s-ludwig avatar s-ludwig commented on May 18, 2024

Can you recheck if this still occurs? From the log output I think it is fixed with the previous commit.

from vibe.d.

unknownbrackets avatar unknownbrackets commented on May 18, 2024

This was happening for me in a snapshot from 28ba2df, but appears fixed in 6230af0.

Was very reproducible: just wait 10-15 seconds after loading a page, and the exception comes up. Then the next page load will hang. Very annoying, very good to be gone.

-[Unknown]

from vibe.d.

s-ludwig avatar s-ludwig commented on May 18, 2024

Ok thanks, I'll close the issue then for now.

from vibe.d.

unknownbrackets avatar unknownbrackets commented on May 18, 2024

Turns out this is still happening. Easy to reproduce in Chrome with pipelining enabled or Firefox with pipelining enabled.

It was happening less but I still get it all the time.

-[Unknown]

from vibe.d.

s-ludwig avatar s-ludwig commented on May 18, 2024

Turned out that TcpConnection.close() was not working correctly. It's somehow rediculous how difficult such things can be to get right with libevent-like libraries compared to bare metal socket code - caused by hidden state that they introduce and which is not really documented.

from vibe.d.

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.