Giter VIP home page Giter VIP logo

pancake2's People

Contributors

pp3345 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pancake2's Issues

Cannot bind to 0.0.0.0

Hey there, very cool project! I've decided to give it a try and hit an issue:

My config looks like this:

HTTP = {
    Interfaces = ({
        Network = "ip4";
        Backlog = 1024;
        Address = "0.0.0.0";
        Port = 8080;
    });

    ...
};

However on startup I get

2020-01-18 21:58:01 [Master] Pancake 2.0
2020-01-18 21:58:01 [Master] Error: No network interfaces configured

which is obviously wrong.

It looks like the bug is here: https://github.com/pp3345/Pancake2/blob/master/PancakeNetwork.c#L313 s_addr is mistakenly thought to be initialized when it is != 0.

Please advise and let me know if you need any more information to help reproduce this bug.

Log output is buffered even for non-regular files

This is a huge problem in debugging, workers only flush their request log every 10 requests or so, meaning log output of master is non-chronological (requests that happened hours earlier can appear later in the log) and you can't follow the log in real-time, which is extremely annoying for development.

Logging configuration only accepts regular files

Would you like to report a feature request or a bug?
bug

Please provide steps to reproduce
Logging to files is very inconvenient, however the Logging options have an unwarranted requirement for regular files, not accepting virtual/device files.

In your pancake.cfg try something like

Logging = {
    System = "/dev/stderr";
    Request = "/dev/stdout";
    Error = "/dev/stderr";
};

What is the expected behavior?
Pancake just logs to the device

What is the current behavior?
You get an error:

[Master] Error: /dev/stderr is not a regular file

What browser/version are you using?
Firefox 72.0.1

[BUG] Some requests are dropped

  1. Run pancake with Workers.Amount=16, Workers.ConcurrencyLimit=1000, HTTP.Interfaces[0].Backlog=10000, which should be high enough to handle a high amount of concurrent requests

  2. Run apachebench with a command like ab -c 100 -n 30000 -s 10 http://127.0.0.1:8080/. This can even be reproduced with a smaller amount, like n=100.

  3. Some requests are dropped and aren't even queued up. The 29990 requests are completed within seconds, then pancake goes completely idle for 10s until apachebench times out for the remaining few requests:

This is ApacheBench, Version 2.3 <$Revision: 1843412 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 3000 requests
Completed 6000 requests
Completed 9000 requests
Completed 12000 requests
Completed 15000 requests
Completed 18000 requests
Completed 21000 requests
Completed 24000 requests
Completed 27000 requests
apr_pollset_poll: The timeout specified has expired (70007)
Total of 29990 requests completed

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.