Meteor-Community-Packages / meteor-typescript

Typescript compiler package
https://packosphere.com/refapp/meteor-typescript
MIT License
5 stars 2 forks source link

Crash when deploy on Heroku #6

Closed MastroLindus closed 1 year ago

MastroLindus commented 3 years ago

I am aware that this plugin has nothing to do with deployments to Heroku, but for some reason using it makes our app crash with a heap out of memory.

2020-12-10T12:33:43.485226+00:00 app[web.1]: [4:0x4a093a0]    11194 ms: Mark-sweep 255.0 (257.8) -> 254.9 (257.8) MB, 257.4 / 0.0 ms  (average mu = 0.072, current mu = 0.001) allocation failure scavenge might not succeed
2020-12-10T12:33:43.485227+00:00 app[web.1]: [4:0x4a093a0]    11432 ms: Mark-sweep 255.6 (257.8) -> 255.7 (257.8) MB, 235.7 / 0.0 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 236 ms
) (average mu = 0.040, current mu = 0.010) allocation failure    
2020-12-10T12:33:43.485228+00:00 app[web.1]:
2020-12-10T12:33:43.485228+00:00 app[web.1]: <--- JS stacktrace --->    
2020-12-10T12:33:43.485228+00:00 app[web.1]:       
2020-12-10T12:33:43.485229+00:00 app[web.1]: ==== JS stack trace =========================================
2020-12-10T12:33:43.485230+00:00 app[web.1]:  
2020-12-10T12:33:43.485231+00:00 app[web.1]: 0: ExitFrame [pc: 0x13cf099]
2020-12-10T12:33:43.485231+00:00 app[web.1]: 1: StubFrame [pc: 0x1355237]
2020-12-10T12:33:43.485231+00:00 app[web.1]: 2: arguments adaptor frame: 3->1    
2020-12-10T12:33:43.485231+00:00 app[web.1]: Security context: 0x1d33c5b408d1 <JSObject> 
2020-12-10T12:33:43.485233+00:00 app[web.1]: 3: filter [0x1d33c5b55df9](this=0x0a797c0ff461 <JSArray[150667]>,0x09c1eddadd39 <JSFunction (sfi = 0x248ba41d3db1)>)    
2020-12-10T12:33:43.485234+00:00 app[web.1]: 4: guessIndent(aka guessIndent) [0x2cd303d9fe11] [/app/.meteor/heroku_build/app/programs/server/node_modules/magic-string/dist/magic-string.cjs.js:201] [bytecode=0x248ba4...    
2020-12-10T12:33:43.485234+00:00 app[web.1]:
2020-12-10T12:33:43.485235+00:00 app[web.1]: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
2020-12-10T12:33:43.485790+00:00 app[web.1]: 1: 0xa093f0 node::Abort() [.meteor/heroku_build/bin/node]
2020-12-10T12:33:43.486210+00:00 app[web.1]: 2: 0xa097fc node::OnFatalError(char const*, char const*) [.meteor/heroku_build/bin/node]
2020-12-10T12:33:43.486706+00:00 app[web.1]: 3: 0xb8431e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [.meteor/heroku_build/bin/node]     
2020-12-10T12:33:43.487170+00:00 app[web.1]: 4: 0xb84699 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [.meteor/heroku_build/bin/node]  
2020-12-10T12:33:43.487748+00:00 app[web.1]: 5: 0xd31055  [.meteor/heroku_build/bin/node]       
2020-12-10T12:33:43.488268+00:00 app[web.1]: 6: 0xd316e6 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [.meteor/heroku_build/bin/node]      
2020-12-10T12:33:43.488832+00:00 app[web.1]: 7: 0xd3df65 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [.meteor/heroku_build/bin/node]  
2020-12-10T12:33:43.489364+00:00 app[web.1]: 8: 0xd3ee15 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [.meteor/heroku_build/bin/node]   
2020-12-10T12:33:43.489897+00:00 app[web.1]: 9: 0xd418cc v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [.meteor/heroku_build/bin/node] 
2020-12-10T12:33:43.490415+00:00 app[web.1]: 10: 0xd10ebe v8::internal::Factory::NewScopeInfo(int, v8::internal::AllocationType) [.meteor/heroku_build/bin/node]  
2020-12-10T12:33:43.490984+00:00 app[web.1]: 11: 0xf3f0d1 v8::internal::ScopeInfo::Create(v8::internal::Isolate*, v8::internal::Zone*, v8::internal::Scope*, v8::internal::MaybeHandle<v8::internal::ScopeInfo>) [.meteor/heroku_build/bin/nod
e]       
2020-12-10T12:33:43.491464+00:00 app[web.1]: 12: 0xbe16a9 v8::internal::Scope::AllocateScopeInfosRecursively(v8::internal::Isolate*, v8::internal::MaybeHandle<v8::internal::ScopeInfo>) [.meteor/heroku_build/bin/node] 
2020-12-10T12:33:43.491946+00:00 app[web.1]: 13: 0xbe1721 v8::internal::DeclarationScope::AllocateScopeInfos(v8::internal::ParseInfo*, v8::internal::Isolate*) [.meteor/heroku_build/bin/node]      
2020-12-10T12:33:43.492484+00:00 app[web.1]: 14: 0xc5d2f5  [.meteor/heroku_build/bin/node]      
2020-12-10T12:33:43.492962+00:00 app[web.1]: 15: 0xc5dc7b v8::internal::Compiler::Compile(v8::internal::Handle<v8::internal::SharedFunctionInfo>, v8::internal::Compiler::ClearExceptionFlag, v8::internal::IsCompiledScope*) [.meteor/heroku_
build/bin/node]  
2020-12-10T12:33:43.493435+00:00 app[web.1]: 16: 0xc605ee v8::internal::Compiler::Compile(v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Compiler::ClearExceptionFlag, v8::internal::IsCompiledScope*) [.meteor/heroku_build/bi
n/node]
2020-12-10T12:33:43.494036+00:00 app[web.1]: 17: 0x10305e2 v8::internal::Runtime_CompileLazy(int, unsigned long*, v8::internal::Isolate*) [.meteor/heroku_build/bin/node] 
2020-12-10T12:33:43.494681+00:00 app[web.1]: 18: 0x13cf099  [.meteor/heroku_build/bin/node]

Replacing the plugin with the official one fixes the problem, and that's weird as I could have expected an error during compilation, but I am surprised to see one at runtime. Do you have any clues on what could be causing this behavior?

perbergland commented 3 years ago

Nothing looks familiar… sorry

diavrank commented 3 years ago

I'm getting the same error but I am not using this package. My packages are:

# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

meteor-base@1.4.0             # Packages every Meteor app needs to have
mobile-experience@1.1.0       # Packages for a great mobile UX
mongo@1.11.0                   # The database Meteor supports right now

standard-minifier-css@1.7.2   # CSS minifier run for production mode
standard-minifier-js@2.6.0    # JS minifier run for production mode
es5-shim@4.8.0                # ECMAScript 5 compatibility for older browsers
ecmascript@0.15.1              # Enable ECMAScript2015+ syntax in app code
typescript@4.2.2              # Enable TypeScript syntax in .ts and .tsx modules
shell-server@0.5.0            # Server-side component of the `meteor shell` command

tracker@1.2.0                 # Dependency tracker to allow reactive callbacks
static-html             # Define static page content in .html files
akryum:vue-component    # Vue-CLI template to publish components

meteortesting:mocha               # A package for writing and running your meteor app and package tests with mocha
mdg:validated-method
alanning:roles
accounts-base@1.9.0
accounts-password@1.7.0
socialize:user-presence
lacosta:method-hooks
peerlibrary:middleware
check@1.3.1
meteorhacks:async
xolvio:cleaner
meteorhacks:ssr
montiapm:agent
tunguska:reactive-aggregate

Any idea to resolve it?

diavrank commented 3 years ago

It was already solved but I don't know why xD. I restarted the Dyno (server) twice and it worked. Maybe it caused by free tier of Heroku and these issues can happen.

perbergland commented 1 year ago

closing