Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 25 21:15

    dependabot-preview[bot] on npm_and_yarn

    (compare)

  • Jan 25 21:15
    dependabot-preview[bot] closed #2470
  • Jan 25 21:15
    dependabot-preview[bot] commented #2470
  • Jan 25 21:15
    dependabot-preview[bot] labeled #2471
  • Jan 25 21:15

    dependabot-preview[bot] on npm_and_yarn

    chore(deps): bump @octokit/rest… (compare)

  • Jan 25 21:15
    dependabot-preview[bot] opened #2471
  • Jan 22 21:21
    dependabot-preview[bot] labeled #2470
  • Jan 22 21:21
    dependabot-preview[bot] opened #2470
  • Jan 22 21:21

    dependabot-preview[bot] on npm_and_yarn

    chore(deps): bump @octokit/rest… (compare)

  • Jan 22 21:20

    dependabot-preview[bot] on npm_and_yarn

    chore(deps): bump gulp-esbuild … (compare)

  • Jan 22 21:20
    dependabot-preview[bot] labeled #2469
  • Jan 22 21:20
    dependabot-preview[bot] opened #2469
  • Jan 21 14:05

    dependabot[bot] on npm_and_yarn

    chore(deps): bump socket.io fro… (compare)

  • Jan 21 14:05
    dependabot[bot] labeled #2468
  • Jan 21 14:05
    dependabot[bot] opened #2468
  • Jan 20 21:31
    dependabot-preview[bot] labeled #2462
  • Jan 20 21:31
    dependabot-preview[bot] edited #2462
  • Jan 20 21:31
    dependabot-preview[bot] commented #2462
  • Jan 20 21:17
    dependabot-preview[bot] labeled #2467
Subham Yadav
@Subham142

@djcruz93 after installing it ,for running the app do i need to run this command
npm run server.generator

?

Dhruv Jain
@djcruz93
after installing and starting redis, just do npm start
Subham Yadav
@Subham142
@djcruz93 Thank you :)
Subham Yadav
@Subham142
i installed the redis server
and started it(texted-'ping" and it returned "pong")
when i do npm start
it shows unknown command npm
does this mean its not global
?
i have node js
as when i do node -v on my cmd it shows
Dhruv Jain
@djcruz93
send the screenshot of the error
Subham Yadav
@Subham142
Screenshot (48).png
just a sec
here it is
Screenshot (49).png
Dhruv Jain
@djcruz93
exit from redis cli
on cmd just write "npm start"
redis server was required to be started and it seems it is working as you received pong
we are not supposed to use redis cli
Subham Yadav
@Subham142

redis server was required to be started and it seems it is working as you received pong

this haapend when i started cli

ok
Screenshot (51).png
is this supposed to happen?
Dhruv Jain
@djcruz93
please cd into your directory
open-event-wsgen
Subham Yadav
@Subham142
or do need to go inside the dire
ok ok
i think its working
Screenshot (52).png
Dhruv Jain
@djcruz93
yup
Subham Yadav
@Subham142
@djcruz93 thank you :)
Mario Behling
@mariobehling
:smile:
Dhruv Jain
@djcruz93
@iamareebjamal I am trying to figure out the issue which we were facing when wsgen was hosted on free dyno frompast two days. Here are the things which I have found out :-
  1. There is a sudden increase in ram usage whenever there is a pingTimeout.
  2. The wsgen server doesn't respond while the resizing task is running since it is being run on the speaker images directory using the async library (async.each), all theresources get busy and the main thread gets blocked due to which server doesn't respond to any request even the regular interval ping request to maintain the socket connection. Thus the socket disconnects on pingTimeout.
  3. For the above thing I tried out 2 things, tried increasing the pingTimeout to 60sec from 25sec(default). The issue of timeout get resolved but in the meantime if any other get request comes the main thread doesn't respond. So then I kept the pingTimeout the same and used async.eachLimit with 2 as the limit instead of async.each which had no limit. It solved the issue.
Another thing I have noticed is that, the ram usage is pretty high and it doesn't scale down after one task generation is complete. It remains the same. This thing made me look if there is memory leak in the application. I used --inspect to load the nodejs debugger but the application heap memory do scale up to ~50MB when there is a genaration event but it scales down to normal ~37MB as well when the generation of website is complete.
Dhruv Jain
@djcruz93
But the ram usage is still high and remains ~490MiB. On application start the ram usage is ~80MB and scales down to ~47MB after initialization.
When a request of website generation is there it hits 300MB and doesn't scale down and keeps scaling up on subsequent requests
I tried searching the web but can't it didn't help.
Please do suggest in what direction should I move on from here
Areeb Jamal
@iamareebjamal
Areeb Jamal
@iamareebjamal
Also, ensure sharp isn't being called synchronously
The wsgen server doesn't respond while the resizing task is running since it is being run on the speaker images directory using the async library
That's true for sync, not async
sync blocks while doing I/O, async keeps listening
It's also important that async.each is taking a batched or parallel approach as I wrote in the PR
If it is taking pictures one by one and resizing, then it's not good enough and will take a lot of time
Dhruv Jain
@djcruz93
cool I'll take care of this
Dhruv Jain
@djcruz93

lovell/sharp#955

@iamareebjamal I tested this out for my dyno(https://damp-wave-90723.herokuapp.com/). This actually has helped achieve significant improvement in the ram usage as jemalloc is actually effective in resolving this issue for sharp. So jemalloc buildpack(https://github.com/gaffneyc/heroku-buildpack-jemalloc) must be enabled on prod as well as dev heroku dyno as it returns the free memory back to the OS and thus solves the issue of blocked memory.

Areeb Jamal
@iamareebjamal
Great. Will do. Do you have statistics?
Dhruv Jain
@djcruz93
not in the form of graph but can share the screenshots of the console displaying the memory after a constant interval of time comparing one with the disabled jemalloc
Areeb Jamal
@iamareebjamal
Just numbers like you wrote above would be fine
Dhruv Jain
@djcruz93
cool
I'll share it in the morning and I'll raise another PR with some improvements for batch processing of images.
Areeb Jamal
@iamareebjamal
Sure, thanks
raunak singh
@Raunaksingh100
@mariobehling and @iamareebjamal 10 days ago there is no reviews
Can you review plz here the link