Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large files proxied may need additional handling #50

Open
rgbkrk opened this issue Feb 19, 2017 · 2 comments
Open

Large files proxied may need additional handling #50

rgbkrk opened this issue Feb 19, 2017 · 2 comments

Comments

@rgbkrk
Copy link
Member

rgbkrk commented Feb 19, 2017

When opening nyc_taxi.ipynb (from the demo) now, this error message is logged to the console:

[0] ::ffff:127.0.0.1 - - [19/Feb/2017:08:26:06 +0000] "GET /api/contents/ HTTP/1.1" 304 -
[0] /Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/request.js:31
[0]             throw err;
[0]             ^
[0]
[0] SyntaxError: Unexpected end of JSON input
[0]     at Object.parse (native)
[0]     at Response.s3.getObject (/Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/src/services/s3.js:70:30)
[0]     at Request.<anonymous> (/Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/request.js:358:18)
[0]     at Request.callListeners (/Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
[0]     at Request.emit (/Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
[0]     at Request.emit (/Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/request.js:671:14)
[0]     at Request.transition (/Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/request.js:22:10)
[0]     at AcceptorStateMachine.runTo (/Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/state_machine.js:14:12)
[0]     at /Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/state_machine.js:26:10
[0]     at Request.<anonymous> (/Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/request.js:38:9)
[1] Proxy error: Could not proxy request /api/contents//nyc_taxi.ipynb from 127.0.0.1:3000 to http://localhost:4000.
[1] See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNRESET).
[1]
[0]
[0] npm
[0]  ERR! Darwin 16.4.0
[0] npm ERR! argv "/Users/kylek/.nvm/versions/node/v6.9.2/bin/node" "/Users/kylek/.nvm/versions/node/v6.9.2/bin/npm" "run" "server"
[0] npm ERR! node v6.9.2
[0] npm ERR! npm  v4.0.5
[0] npm ERR! code ELIFECYCLE
[0] npm ERR! @nteract/commuter-cli@0.1.0 server: `./src/index.js server`
[0] npm ERR! Exit status 1
[0] npm ERR!
[0] npm ERR! Failed at the @nteract/commuter-cli@0.1.0 server script './src/index.js server'.
[0] npm ERR! Make sure you have the latest version of node.js and npm installed.
[0] npm ERR! If you do, this is most likely a problem with the @nteract/commuter-cli package,
[0] npm ERR! not with npm itself.
[0] npm ERR!
[0]  Tell the author that this fails on your system:
[0] npm ERR!     ./src/index.js server
[0] npm ERR! You can get information on how to open an issue for this project with:
[0] npm ERR!     npm bugs @nteract/commuter-cli
[0] npm ERR! Or if that isn't available, you can get their info via:
[0] npm ERR!     npm owner ls @nteract/commuter-cli
[0] npm ERR! There is likely additional logging output above.
[0]
[0] npm ERR! Please include the following file with any support request:
[0] npm ERR!     /Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-cli/npm-debug.log
[0] npm run server exited with code 1

Other notebooks load just fine. Since I know that the nyc_taxi notebook is huge (due to it embedding BokehJS + data, quadruple encoded in many places), it's likely that S3 is expecting us to get the data in chunks (this is my hunch at least). As an aside to this, we'll want to prevent fully exiting/crashing during errors like these (unless we're going to set up some forever for this handling...)

@rgbkrk
Copy link
Member Author

rgbkrk commented Feb 20, 2017

screen shot 2017-02-20 at 1 59 07 pm

@rgbkrk
Copy link
Member Author

rgbkrk commented Feb 22, 2017

[0] SyntaxError: Unexpected end of JSON input
[0]     at Object.parse (native)
[0]     at Response.s3.getObject (/Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/src/services/s3.js:70:30)
[0]     at Request.<anonymous> (/Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/request.js:358:18)
[0]     at Request.callListeners (/Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
[0]     at Request.emit (/Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
[0]     at Request.emit (/Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/request.js:671:14)
[0]     at Request.transition (/Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/request.js:22:10)
[0]     at AcceptorStateMachine.runTo (/Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/state_machine.js:14:12)
[0]     at /Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/state_machine.js:26:10
[0]     at Request.<anonymous> (/Users/kylek/code/src/github.com/nteract/commuter/packages/commuter-server/node_modules/aws-sdk/lib/request.js:38:9)
[1] Proxy error: Could not proxy request /api/contents//nyc_taxi.ipynb from 127.0.0.1:3000 to http://localhost:4000.
[1] See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNRESET).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant