jdchmiel / soundtrack.io

Self-hosted collaborative music playing application.
2 stars 1 forks source link

error killing the site intermittantly #18

Closed jdchmiel closed 10 years ago

jdchmiel commented 10 years ago

plays are 318 long.

/var/www/theGoat/soundtrack.io/node_modules/mongoose/lib/utils.js:419 throw err; ^ TypeError: Cannot set property 'score' of null at /var/www/theGoat/soundtrack.io/nodemodules/underscore/underscore.js:771:21 at Array.forEach (native) at .each._.forEach (/var/www/theGoat/soundtrack.io/nodemodules/underscore/underscore.js:78:1 1) at Function..extend (/var/www/theGoat/soundtrack.io/node_modules/underscore/underscore.js:768 :5) at Promise. (/var/www/theGoat/soundtrack.io/lib/soundtrack.js:213:35) at Promise. (/var/www/theGoat/soundtrack.io/node_modules/mongoose/node_modules/mpro mise/lib/promise.js:162:8) at Promise.emit (events.js:95:17) at Promise.emit (/var/www/theGoat/soundtrack.io/node_modules/mongoose/node_modules/mpromise/li b/promise.js:79:38) at Promise.fulfill (/var/www/theGoat/soundtrack.io/node_modules/mongoose/node_modules/mpromise /lib/promise.js:92:20) at Promise.resolve (/var/www/theGoat/soundtrack.io/node_modules/mongoose/lib/promise.js:108:15 )

Without looking at all yet, guessing this is probably related to me making the schema have orphaned crap by creating the delete functionality? Can look into a cron job to see if node is running, if it is not, start it. Also need to run the parts of the site somewhere other than a screen session. mongo, node, and redis.

jdchmiel commented 10 years ago

{ _id: 5464f7565c921cde1c00058d, slug: 'arrakis-noisia-remix', duration: 373.35, _artist: 545cea6aec86f1621800027d, title: 'Arrakis (Noisia Remix)', slugs: [ 'arrakis-noisia-remix' ], _remixes: [], sources: { vimeo: [], soundcloud: [Object], youtube: [], lastfm: [] }, _sources: [], updated: Thu Jan 01 1970 00:00:00 GMT+0000 (UTC), flags: { live: false, nsfw: false }, _credits: [], titles: [], __v: 0 } ]

/var/www/theGoat/soundtrack.io/node_modules/mongoose/lib/utils.js:419 throw err; ^ TypeError: Cannot set property 'score' of null at /var/www/theGoat/soundtrack.io/nodemodules/underscore/underscore.js:771:21 at Array.forEach (native) at .each._.forEach (/var/www/theGoat/soundtrack.io/nodemodules/underscore/underscore.js:78:11) at Function..extend (/var/www/theGoat/soundtrack.io/node_modules/underscore/underscore.js:768:5) at Promise. (/var/www/theGoat/soundtrack.io/lib/soundtrack.js:213:35) at Promise. (/var/www/theGoat/soundtrack.io/node_modules/mongoose/node_modules/mpromise/lib/promise.js:162:8) at Promise.emit (events.js:95:17) at Promise.emit (/var/www/theGoat/soundtrack.io/node_modules/mongoose/node_modules/mpromise/lib/promise.js:79:38) at Promise.fulfill (/var/www/theGoat/soundtrack.io/node_modules/mongoose/node_modules/mpromise/lib/promise.js:92:20) at Promise.resolve (/var/www/theGoat/soundtrack.io/node_modules/mongoose/lib/promise.js:108:15)

happened again, same line bug.

jdchmiel commented 10 years ago

The issue is the random song generator grabs up to 4096 songs from history of plays and chooses one randomly from the history. There is no unique filter on this, a frequently played song will be chosen again more frequently. When a deleted track is the random selection, no check that it existed was made. I should delete the play from history, but I just want to skip it and log it for now.

jdchmiel commented 10 years ago

deleting seems to work well. Logs show the deletions.