This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Configure max open file | |
| ref : [nodejs.production](https://github.com/dreamerslab/nodejs.production), only `nodejs` user can open more files | |
| $ sudo su | |
| $ echo "nodejs soft nofile 51200" >> /etc/security/limits.conf | |
| $ echo "nodejs hard nofile 51200" >> /etc/security/limits.conf | |
| $ echo "www-data hard nofile 51200" >> /etc/security/limits.conf | |
| $ echo "www-data hard nofile 51200" >> /etc/security/limits.conf | |
| $ echo "session required pam_limits.so" >> /etc/pam.d/common-session |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var JUKEBOX = { | |
| counter : 0, | |
| queue : [], | |
| play : function (){ | |
| // play the song here, when it finished update the counter | |
| if( this.counter !== this.queue.length ){ |