Hello Andrew,
>From what you told us about, I see that you’ve figured out calling garbage
collection manually. I was able to find this link
<https://stackoverflow.com/questions/27321997/how-to-request-the-garbage-collector-in-node-js-to-run>
in Stackoverflow regarding garbage collection for Nodejs generally. Please
tell me if this applies but I think it does.
If you launch the node process with the --expose-gc flag, you can then call
global.gc() to force node to run garbage collection. Keep in mind that all
other execution within your node app is paused until GC completes, so don't
use it too often or it will affect performance.
You might want to include a check when making GC calls from within your
code so things don't go bad if node was run without the flag:
try {
if (global.gc) {global.gc();}
} catch (e) {
console.log("`node --expose-gc index.js`");
process.exit();
}
The second part of your question is why it does not work. The error you
provided from the deployment command would be the next step but Google
Groups is meant for general discussions.
I may check for a common issue if you may provide a timestamp of when you
saw the message.
On Monday, December 14, 2020 at 12:02:33 PM UTC-5 [email protected]
wrote:
> I'm running manual garbage collection every 30 seconds via global.gc();
> and my app.yaml file contains:
>
> *entrypoint: node --expose_gc server*
>
> However, when deploying, I eventually see a startup error displaying:
>
> *Updating service [default] (this may take several
> minutes)...failed.ERROR: (gcloud.app.deploy) Error Response: [9]Application
> startup error! Code: APP_CONTAINER_CRASHED *
>
> Any insight would be greatly appreciated :[
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/07900590-aa13-4ea9-871e-a9a38596e87bn%40googlegroups.com.