GTM Preview mode keeps returning "Out of Memory" error - google-tag-manager

Recently, I started to experience "out of memory" error while previewing in GTM and it is getting more frequent now.
I am certain whenever I try submitting a form in a preview mode, this error would definitely occur while others are pretty random.
Have anyone experienced the same thing, started 2 weeks ago? Any idea how to resolve it?
Thanks in advance
Roman

Try tracing the variables and overall code that fires on the form submission. Looks like something in the container causes rapid memory leak.
There are a few approaches to debugging. I would just read the code and see if certain parts of it are poorly structured. If I can't see anything immediately, which is pretty unlikely, I would start inserting breakpoints in devtools to get closer to the bug.
A simpler, but longer approach would be disabling parts of logic in GTM and reproducing the out of memory error to find the exact trigger/variable/tag/template that causes the issue. After that just debug the code in question.

Related

Rstudio very slow when editing large code

RStudio is working well in general (v 2021.09.1 Build 372).
But when a large code (7000 lines, a collection of functions) is being edited, even a click on the text or unfolding takes about 4 seconds to respond.
I've tried to disable diagnostics, but the problem still occurs.
Is there any setup that can help?
It seems that disabling "use real-time spell-checking" solve the problem.
Before, I've tried other solutions, like disabling "Diagnostics", without results.
Besides, to avoid the slow debugging of that big file, when debug is needed, specific functions are copied to a temp.R and then "debugSourced"

SQL - Whole Records Being Cleared Out Through ASP.NET Web Forms Application

I'm part of a team building a large ASP.NET Web Forms application, and have recently gotten complaints that some records are being "cleared out" after being created -- in this case they create an "inventory" item, save it, and then perhaps after editing some of the data and re-saving, all of the fields are suddenly blank.
I realize that this could be some faulty logic on the save, in which case it will be difficult for you to offer insight, but we've never come across this particular issue before, and haven't really touched the logic. I'm wondering if anyone has some insight into what could possibly be going on, if it's possible that something sporadically happens on the client which makes the values of the input fields blank or unreadable...? I don't know, I'm a bit in the dark and frustrated because I can't reproduce the behavior, and we're losing a bunch of data.
Thanks in advance for any bit of direction or advice.
Related issues in WebForms are often caused by logic related to Page.IsPostBack and values being reset.
Without code it's hard to say; I'd suggest adding some temporary code to log the posted data (and function calls down the line to the database writes). Without logging you're blind.

Aviarc Cannot Create Null Databroker

Just wondering if any one might now how to fix this issue.
Every part of the databroker is created and also all the database connectivity is functional.
But once we try to place them together we come up with a error saying cannot create Null Databroker.
The thing that is really strange is that we have databrokers that are basicly the exact same working.
Can any one shine some light on this issue?
We worked on this together today. We did three things to troubleshoot and fix the problem:
we changed the calling workflow so that the dataset is refreshed inside the show-screen tags (previously, this was done before the screen was called).
we refreshed the dataset (a H2 db) and connected the database (before, it showed as pool not open)
we changed the database name to main
It is working now.
"Null databroker" suggests that the broker was not created correctly, although it doesn't look like that was the case since you don't mention having to modify it to get it to work.
In these cases it can be useful to look at the error logs through the admin app to see if there are errors being thrown at some time other than compile time.

How do I get TextWriterTraceListener to output times much like the standard tracing does?

I'm trying to analyze some running times for various methods in my default.aspx.cs page. I need to use TextWriterTraceListener.
I have it set up so that output is being redirected to the file. However, the data isn't what I want.
As far as I can tell if you simply enable tracing and have the trace appended to the bottom of the webpage you get this nice table with times in between trace calls. It's these times that I care about. An example can be seen here...
http://dotnetperls.com/trace-basics-aspnet
Using TextWriterTraceListener say, for example, I add to the top of Page_Init
System.Diagnostics.Trace.TraceInformation("Begin Page_Init");
and to the bottom...
System.Diagnostics.Trace.TraceInformation("End Page_Init");
here's the output I get...
WebDev.WebServer.EXE Information: 0 : Begin Page_Init
WebDev.WebServer.EXE Information: 0 : End Page_Init
This isn't helpful to me. For one, I don't know what the 0 means. Maybe it's the time, but it's not recognizing anything less than 1 second? I don't know.
I can't find any good resources on this, but I know I have to be missing something, this seems not very useful as is. How do I get times without resorting to some sort of trickery?
Edit: I should note that I found this...
Formatting trace output
However, it seems the consensus is to use log4net or roll your own. Is this really the answer? I'm unsure how this method of tracing could be that useful without any type of timing.
Ok, well writing out Stopwatch values works fine so I guess I'll just do that. It just seems like it should work just the same as when you enable Tracing to the page. I guess not though.
Anyway as far as I can tell, the answer is to use your own method of timing in conjunction with TextWriterTraceListener.

Why does this code only work when I use a break point?

See code below, for some reason it only works when I put a breakpoint on line 2 (*) is there some delay? Is it starting the next line before it finishes the 2nd one?
dp.SSLCertStoreType = nsoftware.IBizPayPal.DirectpaymentSSLCertStoreTypes.sstPEMKey
*dp.SSLCertStore = My.Computer.FileSystem.ReadAllText(Server.MapPath("\cert_key_pem.txt"))
dp.SSLCertSubject = "*"
Note: The error is thrown on the 3rd line only when the breakpoint is set on the 2nd line, after releasing the break the program executes my paypal purchase via credit card.
I will post the error again I am replicating it now...
System error: Could not acquire security credentials: error 8009030E.
There it is, while it should say "Order Confirmed!" type message if working correctly.
Almost certainly a threading issue, but nobody is going to be able to answer definitively unless they're familiar with nsoftware.IBizPayPal
Sometimes you can find that breaking can mutate an object's state, due to the locals window evaluating object properties. If they have a side-effect, then all bets are off, unfortunately :( No idea whether this is happening in your case.
I have no knowledge of ASP, so just wondering aloud: Could this be due to multithreading? You know when you put a break point you sort of freeze execution of all threads, but not so in the real execution.

Resources