how much delay if we remove DeveloperModeWithDebuggerAttachedTelemetryModule from app insight setting? - azure-application-insights

I just read this doc from microsoft:
So I should remove this from production environment. However, on production environment, we setup some alerts to inform us when a burst of exception happens in my site.
Does anyone know much delay we are talking about here? If it is less than 1 or 2 minutes, it is ok. But if the delay is around 10 or 15 minutes, I don't think our production site can wait that long.

Does anyone know much delay we are talking about here?
Normally, it takes around under 5 mins to send telemetry data into application Insights.
If it is less than 1 or 2 minutes, it is ok. But if the delay is around 10 or 15 minutes, I don't think our production site can wait that long.
If you are sending large no of data to Applicaiton Insights it takes as per the data available(Extend more than 5 mins).
If you are using Developer Mode has true you can minimize the latency under 2 mins.
Note: But it was not recommended for production Environment.
Refer one of my SO answer for detailed information.

Related

502 BAD GATEWAY GET / TASK TIMED OUT AFTER 10.01 SECONDS

I am using Next.js and express as front end and back end server. Next.js hosted on the Zeit Now, express app hosted on Heroku.
If I go to express app, I can make sure that it's working correctly and its connection to mongodb works fine as well.
When I hit index page of Next.js through Zeit, it seems to be hanging on the GET / tasks more than 10 seconds.
I am only calling 3 end points just GET methods from index.js of Next.js app. This shouldn't be hanging the whole application.
If I go to my server independently, which only takes less than 3 seconds or so to give back JSON data.
I also looked at function tab Zeit provided, but it won't show what exactly serverless function was failing.
So it is hard for me to debug this. I also set whitelist all IP from Mongo. So the database should be fine.
If anyone dealt with this before, please let me know.
My site is https://www.yaobaiyang.com
Issue happens unexpectedly, you may or may not see this error
I had the same problem on my website:
Check the limit on your plan https://vercel.com/docs/v2/platform/limits (Especially if you're in free plan, you will have some limits.
For the problem was an uncatch error, the lambda crashed and wait the timeout.
Through more understanding, the problem may appear on Heroku, Heroku's free plan is 1000 dyno hours, which is the usage time in general, and then within the 30-minute time limit, if there is no access, the server will go to sleep. . There may be a delay in reawakening, which usually takes longer than when it was active. If this is the problem, the solution is to use
Similar to pingdom or cronjob, a regular automatic request interface, request my Heroku periodically in less than 30 minutes to keep it awake.
Use a VPS like digital ocean or Vultr that runs 24 hours a day, 365 days a month, and then deploy my Node, Nginx, Http/2, etc.
Upgrade Heroku's plan to cancel the 30-minute sleep
Upgrade Zeit has more timeout.

Slow performance when refreshing after 10 mins

I don't know if this is a common issue but in my symfony2 project when I load for the first time it takes around 4 seconds (Profiler saying) after a direct refresh , it takes around 100ms.
I know that it needs to create the cache that's why it takes a long time.
But when I wait around 10 mins and refresh, it takes again around 4s to load.
Does the cache get deleted and symfony2 tries to recreate it ?
How can I fix this issue?
It depends on what your setup is.
Could be the symfony cache being dropped, could be a mysql connection timing out and for some reason being slow to reconnect, could be the mysql cache being dropped.
You could lookup in the profiler where the time is used, maybe that gives you a clue.

For an Azure website running on the shared model what does "Up to 240 minutes of CPU/day"?

I have searched around as many places as I can find and I cant find anything that explains
this clearly.
So far what I think:
On the shared tier you may only have your website consume 240 minutes of cpu time per day.
On another page I found it said that the website is "spun down" 20 minutes after the last activity took place. so if someone visits the webpage it will consume at least 20 mins of cpu/time.
If this is correct then on the shared plan you can only have 20 visits per day max.
Since that sounds absurd to me, there has to be a lot I am missing.
What am I missing?
The situation is not as bad as you interpreted it to be.
The 20 minutes timeout of the IIS site does not consume cpu if there are no requests happening. The 240 minutes CPU/day means that a single core may be under full load created by your site for 240 minutes.
So if you produce very litte CPU load with your application you can handle lots of requests/visits throughout the day.

AIR App hangs, then speeds through missed timers?

This has been a hard problem to diagnose and I was hoping someone could help me out.
We have an AIR app (www.trainerroad.com) that uses Native Process to read data from a command line that comes from a USB stick. It's a cycling app the data is heart rate, cadence, speed and power.
While someone workouts, we record that data to a sqlite database every second. We have a sqlite connection to the database. We have a timer that ticks every second and that's what triggers our inserts.
We have a few hundred users. A few of them have seen it where the app will run for 45 minutes fine, then hang for 30 seconds to a couple minutes. Then, it will release and the clock in the workout will tick down really fast. That means the timers are all getting hit.
This makes me think that something is hanging the app, but I can't figure out what. The app executed the same code every second for 45 or so minutes, then suddenly freezes. (btw, it isn't EVERY 45 minutes, but it does happen after the workout has been running for a while).
I'm thinking it has to do with SQLite. Maybe the database is being compacted while it's being executed against? I'm stumped and I can't reproduce this locally.
Does anyone have any ideas of how to debug this or what area of my app might be causing this? I know it's a hard one.
update
I ran the memory profiler for 20 minutes while it was running and I didn't see peak memory usage increase at all. I could tell it was garbage collecting by looking at the peak vs current memory usage.
I've added two system.gc() calls every 60 ticks. I'm hoping this doesn't make it gittery, but I'm not doing much while it plays so I think I should be good. Not sure if this is what was causing the problem though.
It looks like the manual garbage collection has fixed the issue. We haven't seen this since we put that upgrade in.

page loads very slowly after its left idle

If the leave the webpage (any webpage) on my web application for a while (say 15 min), if I again click on another page it takes a long time to load (20 seconds)
I had a look through the google chrome --> developer module and found that, it is the web page which is the culprit here and the 'LATENCY' time for it is 17 seconds !!! and the actual 'download' time is only 117 ms.
A. what could be the cause of this issue?
B. What can I do to fix it?
thanks.
By default in IIS, your worker processes will idle timeout after 20 minutes and have to be reloaded. This is a configurable setting.
Here's the documentation for IIS6
I am quite certain that it is caused by your worker process recycling. Go to your IIS and check the application pool setting. There is a setting to say that it will automatically recycle after certain time. Either turn it off or increase it
I can't really give you a specific answer here, as I don't know exactly what you may be doing with your application. However, ASP.NET and IIS will not keep everything your web app uses in memory forever. There are two things that could be the culprit here:
1) Your ASP.NET session is timing out, and you are putting something large with a lengthy load in the user session.
2) The IIS app pool is recycling after its idle timeout.
I think that the timeout for both of those is 20 minutes, which would roughly correspond with the 15 minutes or so you are seeing.

Resources