Git Product home page Git Product logo

Comments (6)

endel avatar endel commented on June 19, 2024 1

Thanks for the pull-request.

from uwebsockets-express.

endel avatar endel commented on June 19, 2024

Hi @jaythakor-ai, we need a reproduction scenario to investigate. Either as a test case, or as a full app example that reproduces the issue.

from uwebsockets-express.

girishghoda avatar girishghoda commented on June 19, 2024

Here is the code. We are trying to load a test on post API from Jmeter. Issue occurred and its failed most of the APIs
@endel

   var uWebSockets_js_1 = require("uWebSockets.js");
    var uwebsockets_express_1 = require("uwebsockets-express");
    var uwsApp = uWebSockets_js_1.App();
    var app = (0, uwebsockets_express_1.default)(uwsApp);

    var compression = require('compression');
    app.use(compression({ filter: shouldCompress }))
    function shouldCompress(req, res) {
      if (req.headers['x-no-compression']) {
        // don't compress responses with this request header
        return false
      }
      // fallback to standard filter function
      return compression.filter(req, res)
    }

    http.createServer(function (req, res) {
          app(req, res); /*loggerMod(req, res);*/
        });`
    
     app.listen(1880, function (err) {
          if (err) {
            log.error(log._("server.unable-to-listen", {  }));
          } else {
            // register routes
            app.get("/test_endpoint", function (req, res) {
              res.json({ hello: "world!" });
            });

    uwsApp.get('/internal_healthcheck', (res, req) => {
      res.writeStatus('200 OK').writeHeader('IsAlive', 'Yes').end('{"status":"active","time":"' + Date.now() + '"}');
    })

    app.get('/healthcheck', (req, res) => {
      res.setHeader('Content-Type', 'application/json');
      res.send('{"status":"active","time":"' + Date.now() + '"}');
    });

    app.post("/postAPI", auth.needsPermission("nodes.read"), (req, res)=> {
          //here get an error (not every time, sometimes), currently we are load test on this API with jmeter
    });
 }

from uwebsockets-express.

jaythakor-ai avatar jaythakor-ai commented on June 19, 2024

@endel Please note that this error only comes when the request payload size is big. In our case, payload size is 34 kb.
The uwebsocket-express version we are using is 1.3.1.

from uwebsockets-express.

jaythakor-ai avatar jaythakor-ai commented on June 19, 2024

Hi @endel any updates on this?? We are block on it.

from uwebsockets-express.

jaythakor-ai avatar jaythakor-ai commented on June 19, 2024

@endel Welcome!

from uwebsockets-express.

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.