Too much memory usage. Appreccite any help [SOLVED]

I’m still waiting on he GODEBUG output. If you can post that, I will explain what it means.

I have seen some materials about this GODEBUG, and I haven’t seen where this would help me to fid WHERE IN MY CODE are the memory leaks.

Will do it…

Gentleman, one more question; I’m executing my application in a production computer in which has nothing about GO installed; do I need to install GO on production machine in order to the garbage collactor to work? Or I really just need my executable?

I understand that you are frustrated, but check that attitude mate, we’re all volunteers here, just trying to help.

2 Likes

I’ve answered this in your duplicate thread. No, go applications are stand alone, you just need the binary, and if it uses cgo any libraries in your target system.

1 Like

I’m using a library named StackImpact, the Windows Support was just released today a few hours ago on version 1.2.2. Now I could install StackImpact library and compile my application importing and using StackImpact. So… That’s what I see there on dashboard;

It helps?

Tnx all.

it helps?

Not really. Is there some reason why you cannot provide the GODEBUG information that I asked for?

1 Like

Yes, this application is being tested on production machine, there’s no wayh how to test it on a development one. I guess I gotta install GO on production machine in order to use that environment variable. Or not?

you don’t need to install Go on the prod machine.
just run the executable like so:

$> GODEBUG=gctrace=1 ./your-app

and voila.

1 Like

No, you don’t need to install Go on the target machine. GODEBUG turns on internal debugging embedded in every Go program at compile time.

GODEBUG using this sintax, should be an excutable… Where is this executable? I mean, if I run;

>> GODBUG=gctrace=1 c:\myapp\myapp.exe

GODEBUG is the program. So where is it? If I don’t need installing GO on prodution machine…

[EDITED]
I’m sorry but I still don’t understand how this GODEBUG works, and there’s no consistent information about it on the web…

Environment variables work a little differently in windows, so you’ll need to run this as 2 commands:

> set GODEBUG=gctrace=1
> c:\myapp\myapp.exe

Aaaaaah!! Now I get it… One more doubt; do I have to change my code, I mean put something like breakpoints? I saw on Google some tutorials in which the guy included a

_ = "breakpoint"

Please refer to the section Environment Variables

https://golang.org/pkg/runtime/

You don’t need to change anything. I don’t know where you read that information but it is likely incorrect or not relevant to the advice provided.

Just did it right now, but I see nothing…

Then you probably didn’t do it correctly, the output will be immediate and continual.

I did exactly how @ctd1500 showed… The way he put there’s nno way how to mistake.