question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Instantiating MemoryCache takes ~ 40 seconds locally and leads to wrangler script timeouts

See original GitHub issue

Describe the bug

Instantiating the MemoryCache (lru-cache) in the loader config takes more than 40 seconds on my fast desktop. I also can’t publish with wrangler publish as I am getting a script timeout due to the same reason. When I remove the cache property in the config object, everything works just fine. What could be the reason and how do I take advantage of the MemoryCache without timing out?

Thanks for this awesome repo and documentation, this is an outstanding project!

Steps to Reproduce the Bug or Issue

  1. npx create-remix remix-image --template cloudflare-workers
  2. cd remix-image; yarn add remix-image @next-boost/hybrid-disk-cache
  3. add routes/api/image.ts according to https://remix-image.mcfarl.in/docs/tutorial-extras/cloudflare#transformer with maxSize: 5e7
  4. Add image component

Expected behavior

No timeouts, fast startups, working wrangler publish.

Platform

  • OS: Linux localhost.localdomain 5.16.18-200.fc35.x86_64 SMP PREEMPT Mon Mar 28 14:10:07 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • Browser: Chrome, Firefox

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
styxlabcommented, Apr 20, 2022

Nice, do you have an example of the loader you’re using with KV?

Still work in progress, but you can find it here: https://github.com/styxlab/remix-image-cloudflare.

0reactions
Josh-McFarlincommented, Jun 27, 2022

@styxlab @elliotlaws Today I released v1.0.0 of Remix Image and worked on MemoryCache. It appears to work correctly on Cloudflare environments in dev, but it would be great if you could try the updates and let me know if the issues persist. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cache in-memory in ASP.NET Core - Microsoft Learn
In the preceding code, the cache entry is configured with a sliding expiration of three seconds. If the cache entry isn't accessed for...
Read more >
metaflow_org/community - Gitter
Is there a way to specify a Docker image for a flow when running locally? ... around 23 seconds while on AWS (when...
Read more >
wrangler/CHANGELOG.md at master · cloudflare ... - GitHub
wrangler tail Setting up log streaming from Worker script "test-project". Using ports 8080 and 8081. This may take a few seconds.
Read more >
Xdo - River Thames Conditions - Environment Agency - GOV.UK
48 urban garden athinorama, Sajor bah, Idei de amenajare a dormitorului, 24 hour fitness redmond ridge, Hedwig smijers, Names for fish, A second...
Read more >
Google Cloud release notes | Documentation
The following release notes cover the most recent changes over the last 60 days. For a comprehensive list of product-specific release notes, see...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found