You can add an environment variable through Control Panel to increase the memory allocated to a Node.js project. serverless-webpack is executing webpack. 6: 00007FF7B1747F64 v8::internal::Heap::RootIsImmortalImmovable+14068 export NODE_OPTIONS=--max_old_space_size=8192, https://github.com/serverless/serverless/issues/6503, [3596:0000023D4893D380] 69695 ms: Mark-sweep 1385.0 (1418.9) -> 1385.0 (1418.9) MB, 171.4 / 0.0 ms (average mu = 0.232, current mu = 0.195) allocation failure GC in old space requested The slower runtime is expected, because it takes each webpack compile's output to determine the modules that are really needed for each function and assembles only these for the function package. Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide, I am facing the same issue. This tool will append --max-old-space-size=4096 in all node calls inside your node_modules/.bin/* files. events: Styling contours by colour and by line thickness in QGIS. cache.idleTimeoutAfterLargeChanges option is only available when cache.type is set to 'filesystem'. We're a place where coders share, stay up-to-date and grow their careers. Do roots of these polynomials approach the negative of the Euler-Mascheroni constant? subnetIds: An update: it works when I set transpileOnly: true for ts-loader. new webpack.DefinePlugin({ "global.GENTLY": false }) cannot include dependencies not required by bundle (knex pg). Regardless of your IDE, the JavaScript heap out of memory fix is identical. }, Adding additional memory to the process worked for a while, but, when the complexity of my system grew, the system reached a point where I had to provision more than 12GB for the process not to trigger any faults (and I'd have had to keep increasing it whenever new functions were added). the compile internally! And my conclusion is memory leak in webpack or something else below webpack. Is this behaviour When they are used again they will be deserialized from the disk. Not the answer you're looking for? Sets the cache type to either in memory or on the file system. Why does Mister Mxyzptlk need to have a weakness in the comics? We have next js project that persists cache on the disk and the pak files are close to 200MB. CI should run job in the same absolute path. cache.store tells webpack when to store data on the file system. focused on changing the loaders configurations, but on the way that cache-loader and thread-loader significantly helped for me. - staging I see possible workaround, but it's nasty Invoke child node process (but please not like fork-ts-checker-webpack-plugin) to compile ts with webpack or fix webpack . Learn JavaScript and other programming languages with clear examples. Are you sure you want to hide this comment? Cache the generated webpack modules and chunks to improve build speed. - prod cache.name option is only available when cache.type is set to 'filesystem'. probably out of memory. @grumpy-programmer If youre running a relatively-large project, it may require more memory than the default allocated chunk. - local Different names will lead to different coexisting caches. Maybe an Doubling the cube, field extensions and minimal polynoms. stage: ${opt:stage,'local'} 3: 0x1000b23ef node::OnFatalError(char const*, char const*) [/Users/konnorrogers/.asdf/installs/nodejs/14.17.2/bin/node] @dashmug as far as I remember fork-ts-checker-webpack-plugin compile typescript to javascript fast and spawn thread to check errors. I was thinking on doing a single tsc --noEmit before deploying, but maybe your approach is more rational. I have the same issue but not with webpack. cache.idleTimeoutForInitialStore is the time period after which the initial cache storing should happen. Do ask tho, I'll check whatever necessary. - subnet-0a5e882de1e95480b cache.buildDependencies is an object of arrays of additional code dependencies for the build. The longer build outweighs the better startup behavior (if the lambdas are cold started) and if some big dependencies are only used by one function. No dice. My code is GPL licensed, can I issue a license to have my code be distributed in a specific MIT licensed project? I am struggling with this issue. Site design / logo 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA. Tried the PR from @asprouse - https://github.com/serverless-heaven/serverless-webpack/pull/517 - and can confirm that it fixed the issue for us. How can this new ban on drag possibly be considered constitutional? Please also check if you have set custom: webpackIncludeModules: true in your serverless.yml. The one liner below has worked for some. - sg-0a328af91b6508ffd I still would want to package functions individually to get more optimized bundles but it is not my priority at the moment. path: /api/alexa/petrolstationslocation/{fueltype}/{brand}/{offset}/{miles}/{sort} Short story taking place on a toroidal planet or moon involving flying, How do you get out of a corner when plotting yourself into a corner. On Fri, Apr 26, 2019 at 8:55 AM Andreas Kleiber notifications@github.com @shanmugarajbe please provide minimum reproducible test repo and create new issue. I wrote test webpack-test.js to debug only webpack, and try in every possible way to lost references to preform GC. webpack: 4.12.0 @mikemaccana This issue is over almost 3 years old, I can't remember the specifics, but the line above automagically fixed it for me after wasting hours on finding the exact issue. Still didnt work. We were able to get round this issue setting a Node env variable on our cloud build server, and locally. Can you post the function definitions from your serverless.yml and the webpack config file? However I do not know, if the webpack library will free the allocated resources after the compile again. Dont forget to check the available memory in your machine before increasing the memory limit. cache.maxGenerations: 1: Cache entries are removed after being unused for a single compilation. D n Gi C nh : 1 cmd, npm install -g increase-memory-limit 7: 00007FF6C693FE06 v8::internal::ScavengeJob::operator=+24550 I have the same issue in a monorepo with 10+ services. Not using package: individually: true. I had remove package individually and it works, but I want to use that feature again. It's recommended to set cache.buildDependencies.config: [__filename] in your webpack configuration to get the latest configuration and all dependencies. handler: functions/rest/routesHandler.mainApi As an avid tech-writer he makes sure he stays updated with the latest technology. It will be good if anyone could solve this problem. Thanks for contributing an answer to Stack Overflow! I'm using a combination of fork-ts-checker-webpack-plugin, cache-loader and thread-loader to compile 11 typescript lambda functions but I'm getting this error; I'm now stuck because I can no longer deploy any of my functions. Asking for help, clarification, or responding to other answers. I have implemented a fix (#570) that uses multiple process to compile functions when package individually is on. Hey @HyperBrain thanks for quick response. Defaults to node_modules/.cache/webpack. prod: 3306, functions: Its up to the programmer to use the available memory as they see fit. If yes would it be okay for you if we'd provide a PR? more stuff) and almost never fall on this heap errors (the last I remember { splitChunks: { chunks: "all" } } and chunkhash have been successful for me in increasing the time I have before this becomes a problem, but it still does eventually. AWS Lambda - Nodejs: Allocation failed - JavaScript heap out of memory, FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory error, webpack-node-externals - JavaScript heap out of memory, Angular 5.2 : Getting error while building application using VSTS build server : CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory, How to fix "FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory" error, How to Polyfill node core modules in webpack 5. Does Counterspell prevent from any further spells being cast on a given turn? If this is not the issue, you can increase the node.js memory (it defaults to 1.7 GB, which can be too few for big builds). Why do small African island nations perform better than African continental nations, considering democracy and human development? I am using a new i7/16GB MacBook Pro which started spinning its fans and needed a restart twice from this issue. 2: 0x1000b2289 node::Abort() [/Users/konnorrogers/.asdf/installs/nodejs/14.17.2/bin/node] My Nuxt config file extends the webpack config with a custom plugin that generates . Track and log detailed timing information for individual cache items of type 'filesystem'. This Is Why Peng Cao in Dev Genius 22 VSCode Plugins to Keep You Awesome in 2023 Darius Foroux Save 20 Hours a Week By Removing These. Did it also happen for you with a serverless package? This happens with regular webpack in watch mode, or even using webpack-nano and webpack-plugin-server. - subnet-0c92a13e1d6b93630 How do you ensure that a red herring doesn't violate Chekhov's gun? Could you share your webpack config please ? 8: 00007FF7B173C588 v8::internal::Heap::CollectGarbage+1112 npm scriptsIonic (Angular/TypeScript)Android FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory Windows 10 Angular@5.0.1 ionic@3.9.5 webpack@3.8.1 node v8.11.3 npm@6.1.0 Then I added the caching plugin. With the dev server running, with each change my rebuild time gets about a second longer than the previous one, before crashing at about 50 seconds. Making statements based on opinion; back them up with references or personal experience. This seems to be a Serverless Framework problem. const { merge } = require('webpack-merge'); const common = require('./webpack.common.js'); main: ['babel-polyfill', './src/index.tsx']. Is there anything else I should try? 4: 00007FF6C67626FE v8::internal::FatalProcessOutOfMemory+846 Cache computation of modules which are unchanged and reference only unchanged modules in memory. Time in milliseconds. It detects and rebuilds quickly. , npm run dev,,node. Now the application is back to its previous size and the build does not indur a heap overflow. events: path: /api/util/api-key-generator I'm pretty confident that they're all configured correctly. It's a common issue when using TypeScript 2.1+ and webpack. I tried to increase the max_old_space_size but it still does not work. My project has 20+ functions, fork-ts-checker spawns 20+ threads just for type checking. Workaround to fix heap out of memory when running node binaries. I'm working a project using webpack 3.12.0 with Angular 4.3.1. You should export an environment variable that specifies the amount of virtual memory allocated to Node.js. region: eu-west-2 or maybe it runs a server. Can anyone of you try to set process.env.WORK_DIVISION to a smaller value (maybe 2) and check if the memory consumption still explodes with bigger services? Increase allocated memory and/or upgrade your hardware. I fired up ./bin/webpack-dev-server and all was hunky dory in the land of Rails. Remove the cache. JavaScript also saw the rise of npm that allows you to download libraries and modules like React and Lodash. Update the version when configuration changed in a way which doesn't allow to reuse cache. The caching plugin is in my common file for my webpack config. I tried a lot of things to fix it but the only thing that worked was setting: I'm at a loss as to why this works, but I suspect it may have something to do with creating more small common chunks that do not change between recompiles? You can also set an environment variable through a Windows PowerShell terminal. More importantly, the heap size for a program depends on the available virtual memory allocated to it. This is important since webpack cache files store absolute paths. You can avoid this error by ensuring your program is free of memory leaks. Compression type used for the cache files. @sativ01 as I mentioned in the part that you quoted, I am using webpack --watch with the caching plugin instead of WDS. The issue is caused by a memory leak in postcss-loader. Time in milliseconds. You should change that too. Adding --compile-concurrency 3 fixed problem for me, @j0k3r I'm on 5.5.1 and still have this issue unfortunately. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Serverless uses an archive package that uses another package that falls back to a node implementation of zip if libzip isn't installed. cache is set to type: 'memory' in development mode and disabled in production mode. 14: 0xb84c93c8ef3 subnetIds: externals: ['aws-sdk', 'utf-8-validate', 'bufferutil'], Webpack will use a hash of each of these items and all dependencies to invalidate the filesystem cache. serverless deploy --compile-concurrency 3, @j0k3r I can also confirm that setting the concurrency setting like described in #681 does do the trick in update 5.4.0. limits the number of concurrent compiles in the CI system thus effectively limiting the amount of necessary memory and avoiding the out-of-memory errors). To answer your question you can run it like this 3. handler: functions/rest/routesHandler.alexa_qualify_location Any ETA on when this PR might be reviewed and merged? cache.compression option is only available when cache.type is set to 'filesystem'. I assume the common theme here is that people facing this problem have a plugin that creates a child compiler. environment: Not the answer you're looking for? handler: functions/graphql/handler.graphqlHandler Using the serverless-layers plugin and excluding with webpack-node-externals without using modulesFromFile options stops the build times of subsequent entries time from increasing. lambda: true Webpack javascript Heap out of memory - large number of modules, How Intuit democratizes AI development across teams through reusability. [17208:0000020B4EB70F20] 1184996 ms: Scavenge 3365.3 (4162.0) -> 3364.3 (4162.5) MB, 10.8 / 0.0 ms (average mu = 0.164, current mu = 0.189) allocation failure So you should, as next step, add node externals to your webpack configuration to let the externals be automatically determined by webpack, so that individual packaging can make use of it: Additionally, webpack > 3.0.0 now uses a module: rules structure instead of module: loaders. 12: 0x1006fb197 v8::internal::Runtime_StackGuardWithGap(int, unsigned long*, v8::internal::Isolate*) [/Users/konnorrogers/.asdf/installs/nodejs/14.17.2/bin/node] - subnet-031ce349810fb0f88 cors: true. I had to bump up the RAM to 7GB for it to work. Turned out that installing libzip4 fixed the issue. This fix will only improve memory usage when packaging many functions, anything under ~8 functions probably won't make a difference since they will be packaged concurrently. libraryTarget: 'commonjs', cache: true is an alias to cache: { type: 'memory' }. cache.idleTimeout option is only available when cache.type is set to 'filesystem'. Memory errors can be scary and confusing, but this Node.js one is easy to fix. . cache.idleTimeout denotes the time period after which the cache storing should happen. "build": "export NODE_OPTIONS=--max_old_space_size=8192 && webpack --config webpack.prod.js". Fahad is a writer at MakeUseOf and is currently majoring in Computer Science. 9: 00007FF7B1745EB7 v8::internal::Heap::RootIsImmortalImmovable+5703 This is further confirmed when tested with thread-loader, the timer increases individually in each thread. Templates let you quickly answer FAQs or store snippets for re-use. So I think you guys are looking in the wrong place by saying this leak is a leak in webpacks watch code. I am the author of #681, my project is on-and-off dealing with 200 lambda functions. It always compiles at least once without running out of memory, but crashes on the second or third recompile after a file changes. Operating System: Ubuntu 18.04 How to handle a hobby that makes income in US. So I changed to just using webpack watch with the caching plugin and things are super fast and no memory leaks. - subnet-031ce349810fb0f88 What I've found there is const division = parseInt(process.env.WORK_DIVISION, 10); which seems to control the amount of worker processes spawned for the plugin. are still open (e.g. Same issue, I dont know why it is even closed in the first place. But these old versions did not do invidivual at all. - subnet-0c92a13e1d6b93630 entry: entries, Thanks for keeping DEV Community safe. MYSQL_PORT: ${self:custom.mysqlPort.${self:provider.stage}} 8: 00007FF6C693E45C v8::internal::ScavengeJob::operator=+17980, webpack.config.js It is also vital not to allocate your entire available memory as this can cause a significant system failure. cache.maxAge option is only available when cache.type is set to 'filesystem'. mysqlHost: Memory allocated on the system heap is also called dynamically allocated memory. 11: 00007FF7B187DC6D v8::internal::Factory::AllocateRawArray+61 The amount of time in milliseconds that unused cache entries are allowed to stay in the filesystem cache; defaults to one month. cache.maxMemoryGenerations: 0: Persistent cache will not use an additional memory cache. 2021-01-06: not yet calculated Regardless of your IDE, the "JavaScript heap out of memory" fix is identical. I tried the solution suggested above of using webpack-dev-server but it hangs(?) So I'm quite sure that the memory leak is somewhere in the individual packaging part (maybe the file copy). In the issue at the next repo the problem was cause by chakra ui which also uses emotion under the hood, Facing this issue on a custom setup (no next/cra, custom webpack and dev server configs) using mui which uses emotion under the hood. filename: '[name].js', FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1 npm install -g increase- memory -limit increase- memory -limit 2 export NODE _OPTIONS=".. vue . timeout: 30 If/when this does get fixed I can turn it on then. Why zero amount transaction outputs are kept in Bitcoin Core chainstate database? MYSQL_PASSWORD: ${self:custom.mysqlPassword.${self:provider.stage}} My project uses babel and the issue seems to happen only when enabling source maps (devtool: 'source-map'). MYSQL_USER: ${self:custom.mysqlUser.${self:provider.stage}} https://github.com/notifications/unsubscribe-auth/ABKEZXXTJNYQP6J25MDOOE3PSKRN7ANCNFSM4EHSFFPA is a webpack specific thing. A workaround could be that the plugin would run the compiles in batches of some functions at once. If you don't have any other option, maybe you can try this out. While increasing the allocated memory will temporarily fix the problem, you should find the root cause and fix it. [17208:0000020B4EB70F20] 1185019 ms: Scavenge 3366.8 (4163.0) -> 3366.0 (4163.5) MB, 10.5 / 0.0 ms (average mu = 0.164, current mu = 0.189) allocation failure This is vague - what version of postcss-loader has the memory leak? 3: 00007FF6C6448910 node_module_register+2032 And it seemed to have loaded the ts-loader multiple times. I'll second this, I have a project where even with 4GB of memory allocated it dies at least twice a day with this error. Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide. The default Node memory limit varies from version to version, but the latest Node version 15 still has a memory limit below 2GB. @HyperBrain That setting does appear to be working for me. events: vue 3 build + webpack causes JavaScript heap out of memory Answered on Feb 2, 2022 0votes 2answers QuestionAnswers 0 Next Either you have too many files or you have few files that are too large. - subnet-0c92a13e1d6b93630 Lc theo: Ngn sch. ASP.NET is better suited for large and medium-sized organizations, whereas PHP is better equipped to serve start-ups and small-sized organizations. if you don't expose any company information you wont break the policies. This requires copying data into smaller buffers and has a performance cost. The purpose of this is to remind myself what to do next time I encounter this error with Webpacker. @BobbieBarker Thanks for the investigation webpack-dev-server and JavaScript heap out of memory, Error deploying on Heroku - FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory, Error: Allocation failed - JavaScript heap out of memory, https://stackoverflow.com/questions/53230823/fatal-error-ineffective-mark-compacts-near-heap-limit-allocation-failed-javas, FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory. Leveraging our framework on a testbed of Android mobile phones, we conduct measurements of the Alexa top 1K websites. 2018-09-17. This easily bomb the memory out as you can imagine. - http: Can archive.org's Wayback Machine ignore some query terms? Don't have this issue with 2.2.3. Have a question about this project? If I bump it up to 12GB then the process finishes after about 8-10 minutes. Support for individual packaging is available since 3.0.0. error Command failed with exit code 134. Why are Suriname, Belize, and Guinea-Bissau classified as "Small Island Developing States"? The memory option is straightforward, it tells webpack to store cache in memory and doesn't allow additional configuration: Version of the cache data. Definitely something wrong with ts-loader, setting the transpileOnly option to true we went from 9 minutes deployment time to 2 minutes and got rid of the CALL_AND_RETRY_LAST error. graphql: Staging Ground Beta 1 Recap, and Reviewers needed for Beta 2. I'm pretty swamped right now, I will try not to forget to create the example. It improves performance by quite a bit in the testing I have done. If konnorrogers is not suspended, they can still re-publish their posts from their dashboard. Why are physically impossible and logically impossible concepts considered separate in terms of probability? staging: ${ssm:/database/prod/password} Could serializing the jobs be an intermediate workaround? mysqlUser: Is it possible to create a concave light? was back on webpack 1), so I don't think the solution here should be In my case, I've got around 30 lambdas, and I have two problems: The only way I'm able to use individually packaging is turning on transpileOnly in ts-loader. When I try to upgrade to a later version of serverless-webpack and run sls webpack, the build will run for about a minute and then I get the following error: If I change my serverless config to not package individually, package: individually: false then this error goes away. vpc: Hmmm that sounds like a memory leak somewhere when using individual packaging. @daniel-cottone I've been dealing with the same issue for a couple weeks now. A specially crafted request on port 10001 can allow for a user to retrieve sensitive information without authentication. [1] 28586 abort ./bin/webpack-dev-server, ActionText: All the ways to render an ActionText Attachment, ActionText: Safe listing attributes and tags, ActionText: Modify the rendering of ActiveStorage attachments. Here you can see my webpack config for the production build, nothing out of the ordinary: Here is the build command in the package.json along with the node version set in the engine that matches the docker images node version, I have tried setting the max_old_space_size node option as I have found recommended online but it does not change anything no matter what memory value I give it, image: cypress/browsers:node14.7.0-chrome84, CYPRESS_CACHE_FOLDER: '$CI_PROJECT_DIR/cache/Cypress'. However, version 2.x did not support individual packaging (in fact it only copied the whole artifact per function). 10: 0x10039e248 v8::internal::Heap::HandleGCRequest() [/Users/konnorrogers/.asdf/installs/nodejs/14.17.2/bin/node] I thought a bit about the issue. Most feasible workaround for this right now is simply to turn off individual packaging. staging: live - subnet-031ce349810fb0f88 Does anybody have any solutions to this problem? With multi-compile mode you mean that serverless-webpack "multiplies" the webpack config for each function - like so: https://webpack.js.org/configuration/configuration-types/#exporting-multiple-configurations, I could not find anything else that sounds like multi-compile mode. The nature of simulating nature: A Q&A with IBM Quantum researcher Dr. Jamie We've added a "Necessary cookies only" option to the cookie consent popup. This issue you might have faced while running a project or building a project or deploying from Jenkin. events: cors: true, alexa-qualify-location: Workaround to fix heap out of memory when running node binaries. The only thing you can do is try increasing the memory quota using the nodeflag --max-old-space-size. Filesystem cache allows to share cache between builds in CI. . Most of the time I get the heap out of memory error. Collect unused memory allocated during deserialization, only available when cache.type is set to 'filesystem'. We should check, if the issues Locations for the cache. - http: securityGroupIds: [3596:0000023D4893D380] 69912 ms: Mark-sweep 1385.0 (1418.9) -> 1385.0 (1418.9) MB, 174.2 / 0.0 ms (average mu = 0.214, current mu = 0.197) last resort GC in old space requested, ==== JS stack trace =========================================, Security context: 0x01c260e9e6e9 I am running a pipeline which has a build stage as part of it which is failing due to running out of memory. This behavior matches the log above: It crashed for you at the webpack step! Over ten years of software development experience from scripting language to object-oriented programming (TCL/C/C++/C#/Javascript/Java/Python/React/NodeJS), Microsoft.NET technologies,. Check the memoryLimit option in the ForkTsCheckerWebpackPlugin configuration. How to react to a students panic attack in an oral exam? JavaScript heap out of memory nodejs V8641.4g4gworker mysqlPort: NPM Version: 5.6.0, The same issue, webpack dev server dies every 10 times re-compile the code. I recently upgraded from webpack 3 to 4 and started running into this issue fairly often, whereas before I never encountered this at all. Thanks for contributing an answer to Stack Overflow! EDIT: Also make sure you read https://github.com/webpack/webpack/issues/6389 if you are thinking of downgrading to webpack 4. better optimization-wise, but webpack itself is invoked only once and does You might get away with the following. I'd still love to know more about my question re +645 hidden modules and if that indicates a setup or config issue or is normal?? Edit To help with debugging, here's some version information: Agreed with above. Node memory usage will increase as you have more tasks to process. I have 7 functions, but Base directory for the cache. securityGroupIds: option that allows to configure if webpack is run in parallel or Try reducing the number of cores. wrote: I don't even understand why this is an issue here. V 1.1.1 includes a fix for a regression when working with some other plugins: https://github.com/Realytics/fork-ts-checker-webpack-plugin/releases/tag/v1.1.1 and this may resolve your issue. - subnet-0a5e882de1e95480b JavaScript heap out of memory is a common issue that occurs when there are a lot of processes happening concurrently. FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory #WebSpeedHackathon. // all files with a .ts or .tsx extension will be handled by ts-loader all of them are very small. MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory 1: 0x1012e4da5 node . The difference between the phonemes /p/ and /b/ in Japanese. For my tested JS project, the memory showed roughly the same fill state before and after the webpack run. I have 8GB of RAM. Run this instead of "webpack". 13: 0x100a81a79 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/konnorrogers/.asdf/installs/nodejs/14.17.2/bin/node] FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 0xa222f0 node::Abort() [webpack] 2: 0x96411f node::FatalError(char const*, char const*) [webpack] . Can you point me to the right line - I guess something here is responsible https://github.com/serverless-heaven/serverless-webpack/blob/master/lib/packageModules.js. YMMV, but I'm currently testing what's in this article about using cache-loader and thread-loader.