Ineffective mark-compacts near heap limit Allocati...
# 🌱|help-and-getting-started
s
Hi, after the release of garden 0.13, while running the workflow command, I encounter such error. I tried the solution given in the community such as setting
max-old-space-size
to 8GB/10GB/16GB, but still the error remains the same. We could verify in the terminal that the memory size has been increased but still encountering this error. Is there a concrete solution on why is this happening? Our app modules size is between 80-90 modules. https://cdn.discordapp.com/attachments/1182330589098020985/1182330589320314910/image.png?ex=65844e2b&is=6571d92b&hm=5668bb19e730a290459c120225f48ae1ae78b9a1710ee2c6fcc89d9fbd4cce66&
garden version : 0.13.13 node version: 18.12.1
q
Hi @salmon-article-93420 can you try again with an updated version of
garden
? 0.13.13 is very old now
s
Hi @quaint-dress-831 , thanks for the reply. Any specific version or the latest one?
Could I know the cause of the error? Is it related to application specific or Garden specific?
q
@salmon-article-93420 I would try the latest then let us know if that solves your issue. I couldn't tell you the reason but I know we've since moved to Node 21
If that doesn't solve the issue, please report as a bug with attached error logs so our devs can check it out!
s
Switching to the latest version won't be a piece of cake for us. We are using garden as a fork and have specific changes implemented as per our org. If with the same version I could share the logs, will that be possible?
q
I don't think we're willing to support forks in this case. We'd be happy to consider any changes if you were willing to contribute your changes upstream.
p
We've done a lot of changes since 0.13.13 to improve performance and fix a memory leak. In some benchmarks with large projects we've seen a 3x overall performance increase with 0.13.21 over the older versions. The memory leak you're most likely suffering from has been fixed in 0.13.15 If there's no way for you to upgrade to the latest version due to the fork, you could try to cherry pick the commit from https://github.com/garden-io/garden/pull/5137 and see if that fixes your issue, but I'd strongly recommend trying to get to the latest version. May I ask what sort of specific changes you have implemented? Is there maybe a way to integrate those into the main project, or are they only applicable for a very specific use case?
s
Hi @polite-fountain-28010 , thanks a lot. I already have visited this link, and cherry picked in my garden 0.13.13 codebase. But the issue is the error remains the same.
p
That's a pity. Sadly unless you update your fork to be based on the latest version in main we won't be able to debug this because many internals have changed since 0.13.13 The binaries are even built in an entirely different way now and are no longer based on
pkg
which added its own overheads.
s
ok, sure. Let me try with the newer version. Hope the issue gets resolved.
Thanks for your help
I tried building the latest code(0.13.21) without any changes on my local system by running the following commands 1. npm install 2. npm run build 3. npm run dist After running the last command, I am getting the following error
Failed to run cross: Error: Command failed with ENONT: cross test --target x86_64-apple-darwin
spawn cross ENONT
Any help would be appreciated.
p
Take a look at https://github.com/garden-io/garden/tree/main/garden-sea#development You need Rust and cross installed to build the application now.
s
Thanks Tim
I could build the release binaries using the command "npm run dist [target] # Valid targets are currently
windows-amd64
,
linux-arm64
,
linux-amd64
,
macos-arm64
and
macos-amd64
." Is there a way I could provide more than one platform inside the [target]?
p
You can skip the target and it builds them all, or you separate the targets you need with spaces, so
npm run dist macos-arm64 macos-amd64
s
I cloned the repo and tried the
npm run dist
command, but encountering the error:
Copy code
Some errors have detailed explanations: E0405, E0412, E0425, E0432, E0463.
error: could not compile `ppv-lite86` (lib) due to 747 previous errors
Command "cross test --target x86_64-apple-darwin" failed with code 101:
The list of errors are a bit long.
p
I don't recall seeing that error before. Looking at the CI config, maybe you need to also run
Copy code
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
s
Thanks Tim, but I tried that. The issue is I am not able to build binaries for macos and linux(64-bit and arm). Ran the command
rustup target list
and all the targets are already installed. But when I try to run
npm run dist
, it throws an error. For instance :
Copy code
= note: cc: error: unrecognized command-line option '-arch'
          cc: error: unrecognized command-line option '-framework'
          cc: error: unrecognized command-line option '-framework'
          cc: error: unrecognized command-line option '-framework'
          

error: could not compile `garden` (bin "garden") due to previous error
Command "cross build --target x86_64-apple-darwin --release" failed with code 101:
FYI, I haven't worked on Rust. Is there anything I might be missing?
May I know the commands/steps on building the binaries for different OS?
p
@big-spring-14945 do you have an idea what could be going on here?
What system are you trying the build on?
b
Cross (https://github.com/cross-rs/cross/wiki/Getting-Started) is a tool that uses docker containers to cross-compile the rust binary. Macos targets can only be built on macos machines with Xcode installed, because Apples License agreement for xcode doesn't allow to run apple software on non-apple hardware. It should be possible to compile all the other targets on all systems with a docker engine installed (See also https://github.com/cross-rs/cross/wiki/Getting-Started#installing-a-container-engine) You didn't share what error cross encountered; It is a complex tool that uses docker under the hood, so there are a lot of things that can go wrong. Maybe it's worth to go through the instructions in the cross getting started guide again, or to have a look at open github issues on cross.
s
on linux
hi on garden 0.13.22, I tried running
npm run build
and got the following error. I am using Ubuntu 22.04 and node version 21.5.0. Also tried with node version 21.1.0. Getting the same error. Anyone who could help on this? https://cdn.discordapp.com/attachments/1182330589098020985/1187422842078380135/error.txt?ex=6596d4b2&is=65845fb2&hm=7552e41602748f6ab05685b332690c18053220f1a782e1e6ae3afd421220f216&