npms-io / npms-api

The https://npms.io API
MIT License
189 stars 30 forks source link

Error on package search / Package found has wrong data #87

Closed armanozak closed 5 years ago

armanozak commented 5 years ago

Hi,

I have been trying to find out the reason why a recently added package, although secure and installable, is still missing on npmjs.com search results. I found out that the following error is received on npms API:

"Error: spawn /bin/sh EMFILE\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:246:19)\n    at onErrorNT (internal/child_process.js:427:16)\n    at args.(anonymous function) (/usr/lib/node_modules/pm2/node_modules/event-loop-inspector/index.js:138:29)\n    at processTicksAndRejections (internal/process/next_tick.js:76:17)\nFrom previous event:\n    at exec (/home/analyzer/npms-analyzer/source/lib/analyze/util/exec.js:33:12)\n    at createTmpDir (/home/analyzer/npms-analyzer/source/lib/analyze/download/index.js:39:12)\n    at download (/home/analyzer/npms-analyzer/source/lib/analyze/download/index.js:89:12)\n    at npmNano.getAsync.catch.then (/home/analyzer/npms-analyzer/source/lib/analyze/index.js:160:16)\n    at Request._callback (/home/analyzer/npms-analyzer/source/node_modules/nano/lib/nano.js:118:11)\n    at Request.self.callback (/home/analyzer/npms-analyzer/source/node_modules/request/request.js:185:22)\n    at Request.emit (events.js:197:13)\n    at Request.<anonymous> (/home/analyzer/npms-analyzer/source/node_modules/request/request.js:1161:10)\nFrom previous event:\n    at analyze (/home/analyzer/npms-analyzer/source/lib/analyze/index.js:156:6)\n    at analyze.get.catch.then (/home/analyzer/npms-analyzer/source/cmd/consume.js:52:16)\n    at Request._callback (/home/analyzer/npms-analyzer/source/node_modules/nano/lib/nano.js:118:11)\n    at Request.self.callback (/home/analyzer/npms-analyzer/source/node_modules/request/request.js:185:22)\nFrom previous event:\n    at onMessage (/home/analyzer/npms-analyzer/source/cmd/consume.js:44:6)\n    at Object.queue.consume [as fn] (/home/analyzer/npms-analyzer/source/cmd/consume.js:117:40)\n    at Promise.try (/home/analyzer/npms-analyzer/source/lib/queue.js:308:46)\nFrom previous event:\n    at Promise.resolve._channel.consume (/home/analyzer/npms-analyzer/source/lib/queue.js:308:24)\n    at ConfirmChannel.BaseChannel.dispatchMessage (/home/analyzer/npms-analyzer/source/node_modules/amqplib/lib/channel.js:478:12)\n    at ConfirmChannel.BaseChannel.handleDelivery (/home/analyzer/npms-analyzer/source/node_modules/amqplib/lib/channel.js:487:15)\n    at ConfirmChannel.emit (events.js:197:13)\n    at /home/analyzer/npms-analyzer/source/node_modules/amqplib/lib/channel.js:273:10\n    at ConfirmChannel.content (/home/analyzer/npms-analyzer/source/node_modules/amqplib/lib/channel.js:326:9)\n    at ConfirmChannel.C.acceptMessageFrame (/home/analyzer/npms-analyzer/source/node_modules/amqplib/lib/channel.js:241:31)\n    at ConfirmChannel.C.accept (/home/analyzer/npms-analyzer/source/node_modules/amqplib/lib/channel.js:394:17)\n    at Connection.mainAccept [as accept] (/home/analyzer/npms-analyzer/source/node_modules/amqplib/lib/connection.js:64:33)\n    at Socket.go (/home/analyzer/npms-analyzer/source/node_modules/amqplib/lib/connection.js:478:48)\n    at Socket.emit (events.js:197:13)\n    at emitReadable_ (_stream_readable.js:541:12)\n    at args.(anonymous function) (/usr/lib/node_modules/pm2/node_modules/event-loop-inspector/index.js:138:29)\n    at processTicksAndRejections (internal/process/next_tick.js:76:17)"

The package is https://www.npmjs.com/package/snq.

Thanks.

satazor commented 5 years ago

I noticed that a lot of these erros were happening.

EMFILE usually means that file descriptors are exhausted. I have restarted the service and it has normalized but I will be monitoring closely.

I will trigger a manual analysis for your package.

armanozak commented 5 years ago

Thanks for the quick response. Have a nice day.