carloscasalar / youtube-audio-streamer

Youtube audio streamer
2 stars 1 forks source link

Server hangs after stream some videos #23

Closed carloscasalar closed 6 years ago

carloscasalar commented 6 years ago

After stream a few videos server (in now.sh) server hangs. There are no errors on stack trace.

I'm looking some of this posible solutions / ways to reproduce a red test of it:

carloscasalar commented 6 years ago

Created branch fix/23-server-hangs-after-stream-some-videos to work in the issue.

carloscasalar commented 6 years ago

I'm trying to test the app with superset but decorators don't work as expected. Under superset they are injecting an object instead of youtubeURL and a weird object instead of Res express object. In this issue someone has the same problem: kamilmysliwiec/nest/issues/12. Mark-McCracken says it that thread:

This will only work so long as your typescript's tsconfig.json is targeting es2015 or higher, if targeting es5, this will throw an error like so:

I've updated ES target in tsconfig.json so its value is now ES6. Anyway, test that sends a parameter against the end point continues throwing an error in streamController that says "res.status is not a function". It is because (under superset) Res is not the estándar request express object. the query string variable annotated with @Query isn't a string under supertest.

carloscasalar commented 6 years ago

I'm not able to solve the supertest problem. If I upgrade nestjs to v4.x I'll try to activate the test again (commit 49f41d5).

carloscasalar commented 6 years ago

Next I'll add a process manager to docker image => PM2 to ensure server respawn if it falls.

carloscasalar commented 6 years ago

Docker image modified for run as pm2