Loopback API response is getting stuck at compression
All my loopback APIs response is getting stuck at compression. Compression is defined as part of my middleware with a threshold of 512, now when I disable compression APIs are responding but with compression enabled I am not getting any response.
Versions being used [email protected] [email protected] [email protected]
How does your middleware.json look like? I cannot reproduce the problem locally and I can see compression in use.
{
"Date": "Wed, 29 Jul 2015 18:04:09 GMT",
"Content-Encoding": "gzip",
"X-Powered-By": "Express",
"Etag": "W/\"68f-r2J1D7KPnKtOMys5+f8Qeg\"",
"Vary": "Origin, Accept-Encoding",
"Content-Type": "application/json; charset=utf-8",
"Access-Control-Allow-Credentials": "true",
"Connection": "keep-alive",
"Transfer-Encoding": "chunked"
}
Middleware.json
{ "initial:before": { "loopback#favicon": {} }, "initial": { "compression": { "params": {"threshold": 512} } }, "session": { }, "auth": { }, "parse": { }, "routes": { "loopback#status": { "paths": "/status" } }, "files": { "loopback#static": { "params": "$!../client" } }, "final": { "./middleware/url-not-found": {} }, "final:after": { "errorhandler": {} } }
Nothing suspicious. You can try to run DEBUG=compression node . to see how compression is used.
Did that too in this case the response is getting stuck at gzip compression
If you can share the test case to reproduce the problem, we can take a look.
It's tough to share a test case because it's happening only for one machine the funny part is if I disable the compression APIs start working.
Which endpoint? I had a similar issue earlier today with /change-stream.
Any updates on this issue? I also meet this problem while I am working on the /change-stream with the middleware with compression. If the compression is configured, nothing will be returned from the /change-stream. Without compression, everything works fine.
@ritch, I gave this issue a bug tag since you said you had a similar issue although I was not able to reproduce.
Should this be investigated further? It seems to be on a machine to machine basis...
Is this issue got fixed?i tried using the params with threshold 512 and installed compression 1.7 version and i get the following error
compression: undefined not compressible +7s
compression no compression: filtered +0ms