[VibeD] Hand made proxy

Dicebot public at dicebot.lv
Sun Aug 11 09:33:56 PDT 2013


> But it still has some issues. It works great for small files 
> but for larger
> (~150MB) VibeD just closes remote connection and web browsers 
> just keep trying to receive something until it timeouts.
>
> Another issue which will probably come is the fact that Vibe.D 
> won't be able to serve more than 1 client at the same time. At 
> least my attempts with 2MB file resulted with: 1st client 
> downloading file, 2nd client getting 500 from vibe.d

Such behavior may happen if you use some blocking I/O routine 
which results in timeout for pending connections as thread is 
blocked. However, built-in listenHTTP should be called 
asynchronously. Maybe you have found a bug, maybe something else 
is happening behind the hood, pretty hard to say without 
debugging.

Note that while you can add more worker threads since last vibe.d 
release, it is not really a solution as it just hides the problem 
instead of solving it - in proper event-based application single 
fiber should never block thread long enough to cause dropping of 
other requests.

I have not noticed anything fundamentally wrong with your snippet 
so some deep debugging is needed.


More information about the Digitalmars-d-learn mailing list