Comments (6)
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.
Can you recheck if this still occurs? From the log output I think it is fixed with the previous commit.
from vibe.d.
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.
Ok thanks, I'll close the issue then for now.
from vibe.d.
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.
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)
- Bug: registerWebInterface option 'ignoreTrailingSlash' causes redirect to absolute URL, breaking reverse-proxies HOT 4
- WebSocket segfaults if connection to server drops out HOT 7
- WebSocket connected() crashing HOT 12
- Can't build on (AWS ?) Linux HOT 3
- Unable to call the get method from the request form HOT 2
- Getting and sending JSON correctly HOT 1
- [Bug] Unable to call WebSocket.request._query.get() due to const HOT 1
- [CLOSED] How to deal with generated code via preBuildCommands? HOT 1
- Error when building on Raspberry Pi HOT 1
- notls has no effect
- build fails linking ssl - mac HOT 1
- Any way to write headers after response handler returns? HOT 2
- [bug] why "runWorkerTaskH" executes in same thread for multiple jobs/connections? HOT 2
- [vibe.d] WebSocket mess with "cast(shared) ..." HOT 1
- Access log is pretty useless for vibe server behind a proxy HOT 3
- Proposal: remove whole Meson support at all HOT 11
- Regression #249 - failed to listen to address with default
- Invalid character in internet path. HOT 6
- How to get the client's MAC address in Vibe HOT 2
- Files are not uploaded using nested paths HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vibe.d.