Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query not working #2450

Open
agarwalvaibhav0211 opened this issue Jan 3, 2021 · 2 comments
Open

Query not working #2450

agarwalvaibhav0211 opened this issue Jan 3, 2021 · 2 comments

Comments

@agarwalvaibhav0211
Copy link

when I tried to query
SELECT DISTINCT(UPPER(category)) as value FROM academic_council;,
its resulting in a memory exhaust. this is the error trace:

<--- Last few GCs --->
n [8800:0x4610890] 30049 ms: Mark-sweep 1399.8 (1426.4) -> 1399.5 (1427.4) MB, 810.4 / 0.0 ms (+ 0.0 ms in 18 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 822 ms) (average mu = 0.088, current mu = 0.016) allocation [8800:0x4610890] 31225 ms: Mark-sweep 1400.6 (1427.4) -> 1400.3 (1427.9) MB, 1168.1 / 0.0 ms (+ 0.0 ms in 18 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 1176 ms) (average mu = 0.041, current mu = 0.007) allocatio

<--- JS stacktrace --->

==== JS stack trace =========================================

0: ExitFrame [pc: 0x129a987dbf1d]

Security context: 0x38cbd5fd7919
1: DoJoin(aka DoJoin) [0x38cbd5fc1f81] [native array.js:~87] [pc=0x129a98aca24d](this=0x2698817026f1 ,l=0x29cb86206531 <JSArray[6]>,m=6,A=0x2698817028c9 ,w=0x01b3984ab539 <String[1]: ,>,v=0x2698817029a1 )
2: Join(aka Join) [0x38cbd5fc1fd1] [native array.js:~112] [pc=0x129a98ad15f8](this=0x2698817026f1 ,l=0x29cb86206...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x8fb090 node::Abort() [/home/vaibhav/.nvm/versions/node/v10.23.0/bin/node]
2: 0x8fb0dc [/home/vaibhav/.nvm/versions/node/v10.23.0/bin/node]
3: 0xb031be v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/home/vaibhav/.nvm/versions/node/v10.23.0/bin/node]
4: 0xb033f4 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/home/vaibhav/.nvm/versions/node/v10.23.0/bin/node]
5: 0xef7452 [/home/vaibhav/.nvm/versions/node/v10.23.0/bin/node]
6: 0xef7558 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [/home/vaibhav/.nvm/versions/node/v10.23.0/bin/node]
7: 0xf03632 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/home/vaibhav/.nvm/versions/node/v10.23.0/bin/node]
8: 0xf03f64 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/home/vaibhav/.nvm/versions/node/v10.23.0/bin/node]
9: 0xf06bd1 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/home/vaibhav/.nvm/versions/node/v10.23.0/bin/node]
10: 0xed681b v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/home/vaibhav/.nvm/versions/node/v10.23.0/bin/node]
11: 0x11c55b8 v8::internal::Runtime_StringBuilderJoin(int, v8::internal::Object**, v8::internal::Isolate*) [/home/vaibhav/.nvm/versions/node/v10.23.0/bin/node]
12: 0x129a987dbf1d

why is this happening? Can MySQL functions be queried this way?? When I tried the query from MySQL console, it was working correctly, so I don't think its an issue with my database

@Zikoel
Copy link

Zikoel commented Apr 14, 2021

From the error seems that the result of the query is too big for the heap assigned to node! How big is the result and how much memory has your node application ?

@dougwilson
Copy link
Member

dougwilson commented Apr 14, 2021

We would also need a heapdump of your v8 memory at the time so we can see what objects are consuming the heap space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants