Comments (6)
Thanks for the pull-request.
from uwebsockets-express.
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.
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.
@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.
Hi @endel any updates on this?? We are block on it.
from uwebsockets-express.
@endel Welcome!
from uwebsockets-express.
Related Issues (20)
- Allow to access routes via trailing slash HOT 1
- Sending status code is not working HOT 2
- get `expressify is not a functiuon` in .js file HOT 1
- Property 'socket' in type 'IncomingMessage' is not assignable to the same property in base type 'IncomingMessage' HOT 2
- Not working with Colyseus proxy HOT 5
- Corking HOT 6
- Cannot use uWebSockets-express with @colyseus/monitor HOT 1
- IncomingMessage and ServerResponse types aren't exported directly HOT 1
- HEAD requests not stripping body HOT 8
- Full body not received HOT 2
- NPM package is missing direct link to Github repository
- TypeError: expressify is not a function HOT 5
- 500ms Content-Length timeout is not enough HOT 4
- uWebSockets-express should stop utf-8 decoding the body HOT 6
- TypeError: res.flush is not a function HOT 1
- Some help HOT 5
- Compare with nanoexpress HOT 3
- Express router middleware/route order issue HOT 2
- Content-Length > actual size will result in Error: socket hang up HOT 1
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 uwebsockets-express.