Why does it take so long to deploy a nodejs app on GAE flex vm? - app-engine-flexible

It always takes more than 5-6 minutes to update a GAE node app with a new version. I am probably doing something wrong and not sure how I can speed up deployments?

You're probably not doing anything wrong. Unfortunately 5-6 minutes is not uncommon for flex deployments and we are actively working on improving that.

Related

How can I audit which part of my app is slow?

When I run my app locally, it's nice and fast, however, when I deploy to Vercel, things get very very slow. My app is a NextJS app, using Prisma as the db client. The database is an Amazon RDS Postgres instance. I'm pre-launch so there's no real traffic, so I don't think there are issues with connections or that I need a pgbouncer setup... though I don't really know how to audit that either.
Any tips I'd love to hear em!
Might be worthwhile to use the browser Dev Tools, specifically the Network and Performance tabs, to see if you can find what is slowing you down.
You could also check out using the React Dev Tools and look at the Profiler tool there, but that has to be run locally, which may not be as useful, since you say the app runs fast locally

Push to Azure Container Registry is painfully slow at unpredictable times

We're pushing docker images from Azure DevOps pipeline to the repo in ACR.
The build agent is running on a VM in Azure and it's not utilised by anything else.
Sometimes (often at night) the push commands takes 3s, sometimes (mostly during the day UTC) it can take up to 20min.
The tier of our ACR is Standard.
Do you encounter similar problems? Is there to do to avoid these "lags"?
Since we're pusinh many images per day, this can be really a nuisance.
There is an issue about this is on Github: https://github.com/Azure/acr/issues/214
For us it has been especially bad yesterday and today.
In the issue on Github they mentioned they are looking into it: https://github.com/Azure/acr/issues/214#issuecomment-509672337

Next.js app takes 33 seconds to load. What could make it THAT slow?

I'm almost done with my first ever Next.js app.
Dev was always somewhat slow to load, but production is absolutely ridiculous.
On first load it takes 30+ seconds for the home page to render.
I've seen really slow sites take 5-10 seconds, but what could I possibly be doing wrong that would lead to 30 second load times?
Is prefetch a huge performance killer?
Finding the bottleneck:
First of all you need to find out what is making your site slow.
For that I recommend lighthouse or the network tab of your development tools.
Common developer mistakes:
A. Development instead production mode:
Next.js has two modes. The development mode (next dev) is pretty slow, since a lot of development tools are executed and shipped.
To run your app in production mode first build it with next build and then start it with next start.
B. Included too much code:
Sometimes developers include gigantic npm modules or even modules that only have been build for node.js into next.js.
Finding these modules is actually pretty easy thanks to these examples:
https://github.com/zeit/next.js/tree/canary/examples/with-webpack-bundle-analyzer
https://github.com/zeit/next.js/tree/canary/examples/with-webpack-bundle-size-analyzer
C. Cold Serverless instance:
If you are running your next.js instance on a serverless provider keep in mind that it may take some time to start the serverless instance. Especially if you have a free plan.
Try to exclude your development directory from Windows Defender

When will Meteor.com Meteor hosting be reliable enough for production use?

I've had very mixed experiences trying to host on Meteor.com.
I often get "This site is down. Try again later.". Initially I couldn't figure out why, but then I suspected that the problems were caused by me accidentally restoring the "system.users" collection. I tried restoring without that, but the site went down a few days later. Today, it's magically back up again without me doing anything.
"meteor logs" shows nothing. It's a complete black box.
I've investigated other options (Heroku, demeteorizer, meteor bundle, etc), but they are clunky and unreliable too (problems installing fibers, doesn't seem to handle Meteor.call() properly, etc).
I would really like to host in production on Meteor.com, but I feel I can't trust it right now. Free is nice, but I need reliable, production-quality Meteor hosting. When will I be able to buy that from Meteor.com?
Thanks,
Graeme
From the documentation:
We provide this as a free service so you can try Meteor. It is also helpful for quickly putting up internal betas, demos, and so on.
So it means it's intended to try things out, not for production. They offer it for free, I think it would be bad manner to abuse it. And with so many people around trying the thing, don't be surprised if it's overloaded from time to time.
I'm not sure if and when the Meteor team will make this hosting production ready. At this moment, I'm happy they're focusing on making the framework mature.
For other options, Heroku works as a charm. I'm using it for several projects, including production ones, and had no problem. Don't bother with demeteorizer and such. Just create a new app and run these commands (replacing appname with your app name):
heroku git:remote -a appname
heroku config:add ROOT_URL=appname.herokuapp.com
heroku config:set BUILDPACK_URL=https://github.com/oortcloud/heroku-buildpack-meteorite.git
git push -f heroku master
MDG (the Meteor Development Group, the core team) is working on a hosting solution called Galaxy. It will likely tie in to meteor in ways other solutions won't (such as meteor deploy). This will be (AFAIK) a paid service, and as such will likely offer analytics for better insight (my guess). And of course scaling will be taken care of for us.
More on the subject: http://www.meteor.com/blog/2013/10/01/geoff-schmidt-at-devshop-8-getting-meteor-to-10

What are some reasons ASP .NET startup would be so slow

I have Visual Studio 2010 and a pretty large web application project running on IIS 7. Startup for the web application is over a minute (75 seconds). I've attached ANTS to it and very little of the 75 seconds is my code. Most of it seems to be something like CreateAppDomainWithHostingEnvironment and BuildManager stuff. Now I know that ASP .NET will compile dynamically the first time but I certainly don't expect it to compile for that long. Why could I be experiencing this problem and what are some ways I can try to fix it or try to better understand what is taking so much time. Aksi the CPU utilization doesn't seem to be that high. I have an awesome machine.
The problem with the 75 second startup is that for developers working on this, everytime they make a change they have to wait this 75 seconds.
I am using .NET 4.0
EDIT
I ran Microsoft Network Monitor on my machine to see if there was anything suspicious going on the network. There wasn't as far as I can tell though i wasn't sure what to look for (I am familiar with network monitor though so I did have an idea of what I was doing). I tried to run it in release build and though it may have improved the performance a little bit its not really significant
EDIT
I have SQL Session state. As far as i can tell, the connection string is pointing local. For some reasons though, when examinning ANTS, i'm getting a lot PollLockedSessionCallback on many threads. The function seems to be called over 70 times. Does this help at all?
Try building the application in release mode. You can set this in the Build tab of the properties window. You might also consider pre-compiling when publishing the application before deployment.
Are you trying to access anything via a network share at startup? If so, bring those resources local for startup comparison.

Resources