Live data from Hacker News

Show HN: Dashku - a real-time dashboard app, built with SocketStream

dashku.com

41–50 of 63 posts

Re: Show HN: Dashku - a real-time dashboard app, built with SocketStream

#42
post #40

You shouldn't be serving your static landing pages and assets over node.js. Ideally you should have an nginx server reverse proxy dynamic requests to your node.js server. Nginx should serve the static assets before the requests hit the node server.

You have some data to back up this recommendation?

Re: Show HN: Dashku - a real-time dashboard app, built with SocketStream

#43

Getting this error: Error: ENOENT, no such file or directory '/root/apps/status/client/static/assets/main/1340976517230.html' at Object.openSync (fs.js:240:18) at Object.readFileSync (fs.js:128:15) at ServerResponse. (/root/apps/status/node_modules/socketstream/lib/client/http.js:34:26) at EventEmitter. (/root/apps/status/app.coffee:48:16) at EventEmitter.emit (/root/apps/status/node_modules/socketstream/node_modules…

Hi carlsednaoui

As the creator of SocketStream, I am very keen to know how this error occurred. I believe it relates to the ulimit issue Paul mentioned in another comment which was fixed some time ago (i.e. the file was there, but the user was out of file descriptors)... not sure yet. Either way, we need to catch the exception properly.

As a general tip to all those hosting a Node app in production, you can catch uncaught exceptions with:

process.on('uncaughtException', function(err) { console.log(err); });

This ensures anything which goes wrong unexpectedly will be logged to your console, rather than sent to the browser - not good!

SocketStream doesn't currently do this for you by default, but maybe it should (in production mode). It's something I will consider implementing in the near future.

So far my focus has been on creating a great dev environment. It's very encouraging to see Dashku stand up to thousands of simultaneous users (once the ulimit issue was fixed), but I'm the first to admit more work is needed to ensure SocketStream is rock solid in production. It will take time but, thanks in part to experiences like today's, we'll get there.

Great job Paul.

Owen

Re: Show HN: Dashku - a real-time dashboard app, built with SocketStream

#44
post #39

Earlier quoted context omitted.

Hi everyone, Once again, my apologies for the downtime. For some reason, this was the case: $ ulimit -n > 1024 I thought I had set the ulimit to unlimited, but that wasn't so. The site is alive, but may still be intermittent. Will keep you updated.

Did you set the limit on the CLI or within your limits.conf file? limits.conf is how you persist the value between reboots.

CLI (facepalm). Thanks for the tip.

Re: Show HN: Dashku - a real-time dashboard app, built with SocketStream

#45
post #41

14 minute video? Why? On the homepage have a video that is 30-60 seconds. here is an example http://www.youtube.com/watch?v=qFcZjtGS1CE Otherwise looks good.

I hadn't seen that before, and I've sent a batch of photos. Really well done!

Re: Show HN: Dashku - a real-time dashboard app, built with SocketStream

#50
post #39

Earlier quoted context omitted.

Did you set the limit on the CLI or within your limits.conf file? limits.conf is how you persist the value between reboots.

CLI (facepalm). Thanks for the tip.

No problem.

Fantastic site, by the way.

Post reply on HN