question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App Crash after querying thousands of records (mySQL)

See original GitHub issue

App is crashing after querying a simple select, which returns more than 185446 records.

The select is simple: select * from table where foreign_key = 1

Database: MYSQL

========== Log Below ==================

Process: Sqlectron [4366] Path: /opt/homebrew-cask/*/Sqlectron.app/Contents/MacOS/Sqlectron Identifier: org.sqlectron.gui Version: 1.7.0 (1.7.0.76) Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: Sqlectron [4366] User ID: 501

Date/Time: 2016-04-27 15:29:23.244 -0300 OS Version: Mac OS X 10.11.4 (15E65) Report Version: 11 Anonymous UUID: DB8C8B51-673C-1D32-89CA-B442454AA8D1

Time Awake Since Boot: 27000 seconds

System Integrity Protection: enabled

Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread 0 com.github.electron.framework 0x000000010e1c2ac4 0x10e0f7000 + 834244 1 com.github.electron.framework 0x000000010e1c2ab9 0x10e0f7000 + 834233 2 libnode.dylib 0x0000000112621f81 v8::internal::V8::FatalProcessOutOfMemory(char const_, bool) + 593 3 libnode.dylib 0x00000001127d377e v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) + 542 4 libnode.dylib 0x0000000112a664d9 v8::internal::Runtime_StringBuilderJoin(int, v8::internal::Object__, v8::internal::Isolate_) + 521

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
maxcnunescommented, May 31, 2016

I have spent some time trying to figure out the best way to replace the IPC call with data stream. These are the results of the tests with stream for each client:

  • mysql - Has support to stream single or multiple query statements.
  • pg - Has support to stream only single query statement.
  • mmsql - I have not tested. Not sure if has support to stream multiple query statements.

Since only one client has support for streaming multiple query statements (based on what I have tested). I don’t think is worth changing the process to execute queries with stream and Promise support. Also this problem only occur on selecting hundred thousand rows. Which should be avoid most of the time. Therefore, right now I will not work on this issue. But I will let this issue open, in case we find a better solution in the future.

1reaction
maxcnunescommented, May 24, 2016

Debugging the problem. Seems like the memory leak happens on electron while it prepares the response from the main process to the renderer process. I’m planing in replacing the remote IPC calls with HTTP requests over a HTTP server running in the main process. It would allow use streams to response the query results. Which I guess would fix this problem. I still testing this approach. Lets see if it works. But I guess it will. Because IPC calls are not recommended way to transfer large data.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MySQL Bugs: #13548: Larger Result Sets Cause Crashes
Description: Performing queries with result sets in the thousands of rows (10K to 20K+) makes the query browser perform extremely slowly at first....
Read more >
App crashing while retrieving data from mysql - Stack Overflow
Everytime I execute inside Asyntax an sql query like "select * from databasename" and do something like while(rs.next) my app keeps on crashing....
Read more >
Ways to Crash or Overload MySQL - Percona
There are many ways to crash or overload MySQL if you have access to it with normal privileges.
Read more >
MySQL crashing at about 70k open files - DBA Stack Exchange
tmpdirs are at 0/1% usage, I can't say what query because there are thousands of queries per second... – the_nuts. Feb 1, 2019...
Read more >
How To Address Crashes in MySQL | DigitalOcean
To check this, you will need to review the MySQL error log after a crash. First, attempt to start the MySQL server by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found