Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 03 12:20
    depfu[bot] synchronize #847
  • Jan 03 12:20

    depfu[bot] on update

    Update jasmine to version 3.99.0 (compare)

  • Jan 03 12:15
    depfu[bot] synchronize #845
  • Jan 03 12:15

    depfu[bot] on update

    Update jest to version 27.4.5 (compare)

  • Jan 03 12:08
    depfu[bot] edited #845
  • Jan 03 12:08
    depfu[bot] edited #847
  • Jan 03 12:08
    depfu[bot] synchronize #849
  • Jan 03 12:08

    depfu[bot] on update

    Update jasmine to version 4.0.0 (compare)

  • Jan 03 12:08
    papandreou commented #849
  • Jan 03 12:08
    depfu[bot] edited #849
  • Jan 03 12:07

    depfu[bot] on update

    (compare)

  • Jan 03 12:07

    papandreou on master

    Update jasmine-core to version … Merge pull request #848 from un… (compare)

  • Jan 03 12:07
    papandreou closed #848
  • Jan 03 00:30
    depfu[bot] labeled #849
  • Jan 03 00:30
    depfu[bot] opened #849
  • Jan 02 23:25

    depfu[bot] on update

    Update jasmine to version 4.0.0 (compare)

  • Jan 02 23:20
    depfu[bot] labeled #848
  • Jan 02 23:20
    depfu[bot] opened #848
  • Jan 02 22:11

    depfu[bot] on update

    Update jasmine-core to version … (compare)

  • Jan 02 21:40

    depfu[bot] on update

    (compare)

Sune Simonsen
@sunesimonsen
haha :joy:
There goes the micro service :sweat:
If there is even such a thing.
Andreas Lind
@papandreou
I think it depends on whether you're planning to use advanced features such as pre-signed POST urls, request signing etc.
Gustav Nikolaj
@gustavnikolaj
I need to have multipart uploads, and that's pretty much it :) It's just for uploading a heapdump once in a while
Peter Müller
@Munter
Don't dump Heap ;)
Gustav Nikolaj
@gustavnikolaj
10hi :)
Andreas Lind
@papandreou
:smirk_cat:
Then a super minimal client should be fine, maybe just an HTTP client :)
Gustav Nikolaj
@gustavnikolaj
I found this alternative client, from another s3 compatible storage vendor, which seems to work fine :) https://www.npmjs.com/package/minio
@papandreou yeah, I was considering doing that, but the files are big enough that I'm going to need to split them into multiple requests, so it's a bit more involved than just using an http agent :)
Andreas Lind
@papandreou
Are they really too big to be streamed?
IDK if the HTTP-based api supports PUT with Content-Range
Gustav Nikolaj
@gustavnikolaj

The largest object that can be uploaded in a single PUT is 5 gigabytes. For objects larger than 100 megabytes, customers should consider using the Multipart Upload capability.
https://aws.amazon.com/s3/faqs/

We have average memory consumption of a couple hundred of megabytes, but it will typically be used to debug containers nearing the memory limit. So I'd expect sizes in the interval from ~200 MB to 4 GB. Should be enough with a single PUT then

All the docs I've read so far only mentioned the recommendation of > 100 megs
But it's internal network traffic all of it, so it should be alright :)
Andreas Lind
@papandreou
Watch out for all the PII, private keys etc. that such a heap snapshot might contain :)
Gustav Nikolaj
@gustavnikolaj
Thanks. That's good advice. It's definitely not something you want to be too liberal about
Gustav Nikolaj
@gustavnikolaj
How do you prove, in an objective way, that a node.js server is doing something blocking? :D
Gustav Nikolaj
@gustavnikolaj
My best idea so far is to graph the amount of processes running, and the throughput/requests per sec, and then see if we ever have a higher throughput than the number of processes
Sune Simonsen
@sunesimonsen
@Munter @alexjeffburke do you know a good way to add typescript definitions a dynamic library but where I want to expose types for the public API.
Is type annotations in comments an option?
Peter Müller
@Munter
@sunesimonsen I remember a couple of people on twitter talking about being able to write js with jsdoc, and having typescript types extracted from that. The problem is that jsdoc is pretty limited when it comes to generics, if you might want to use those. And when I tried this approach in the very early days of that tooling, the output wasn't super useful
You don't want to write .d.ts files by hand?
Sune Simonsen
@sunesimonsen
I have a setup where I can generate the .d.ts from JSDoc, but I think I'll just write the .d.ts by hand. Then I avoid any new tooling.
It is pretty limited amount of typing I want to expose.
Peter Müller
@Munter
If it's for unexpected, i have some type definitions i have copied around for a few years now, which take care of most of the API besides assertions
Sune Simonsen
@sunesimonsen
it is for work, I want as little types as I can get away with 😂
Andreas Lind
@papandreou
There’s a library called blocked that uses a setInterval or similar to guesstimate how many milliseconds the event loop has been blocked for, and fires an event if it crosses a threshold you’ve specified.
It has a drop-in replacement called blocked-at that uses async_hooks to also provide a stack trace of where the blocking operation was initiated. Unfortunately it has a big perf overhead, so it’s not suitable for production.
@gustavnikolaj :point_up:
Sune Simonsen
@sunesimonsen
Screenshot 2021-10-07 at 21.14.28.png
Scripting with https://github.com/sunesimonsen/transformation is pretty fun and useful.
Gustav Nikolaj
@gustavnikolaj
I am debugging a memory leak in a node.js application. I observe that my rss is way bigger than my heapTotal and external memory segments combined when I inspect process.memoryUsage(). I would expect that heapTotal + external gives me all the memory used by js objects and c++ objects referenced from js. Am I missing something? Wouldn't a runaway rss number be an indication that theres some native code leaking? I am observing up to 70 to 80 percent of memory use being outside of heap and external...
Thanks for the suggestions on the event loop blocking @papandreou. I managed to convince the teams that they actually had a block without having to resort to scientific proofs :) Unfortunately we were sick all week so I never got back to you :(
Andreas Lind
@papandreou
@gustavnikolaj, external will only include memory that is allocated outside the JS heap and correctly reported using Isolate::AdjustAmountOfExternalAllocatedMemory: https://v8docs.nodesource.com/node-4.8/d5/dda/classv8_1_1_isolate.html#ae1a59cac60409d3922582c4af675473e
... so it's not an exact science. V8 doesn't automatically know that malloc gets called.
Maybe that explains the gap, depending on which native modules are involved?
Gustav Nikolaj
@gustavnikolaj
That could certainly be an explanation
These are the modules using nan as a dependency - that's the quickest way I know to check for native modules :) iconv, sharp, genx and node-expat.
I'd by default suspect that latter two most, but it actually seems to happen regardless of wether I engage the XML-related bit of the server :D
Andreas Lind
@papandreou
sharp, for sure :)
Gustav Nikolaj
@gustavnikolaj
We saw some very unfortunate interactions with sharp and ubuntu 18.04. We went from stable memory use to rampant leaks, pretty much making the apps unusable due to oomkilling... But they seemed mostly solved by enabling jemalloc.
But I'll take a look at sharp :) Thanks for the pointer!
Andreas Lind
@papandreou
At least the symptoms you list are consistent with what I've seen with sharp before.
Sune Simonsen
@sunesimonsen
I made a Babel plugin for stylewars to minify CSS in place. Now my Hackernews example with 7 dependencies (VDOM, store, router and styling) is down to 12.7K JavaScript :tada:
Andreas Lind
@papandreou
In bed with the enemy, huh? :)
Sune Simonsen
@sunesimonsen
Haha I only fighting for a no tooling developing experience, I think there will always be an optimizing build for production.
That build tooling can be anything as I'm just following the rules of the web :-)
So if there was a snazzy asset-graph builder that would do it all, I would welcome it ;-)
Andreas Lind
@papandreou
I recently made a rollup integration :)