Code Monkey home page Code Monkey logo

Comments (8)

hamadodene avatar hamadodene commented on August 14, 2024

Hi @ouovowo
To help us understand the problem, can you share us your JVM configuration (bin/setenv.sh file)?
Note that the exception you sent us indicates that the configured JVM memory is not enough.
One solution would be to try increasing JVM memory by changing the -Xmx and -Xms variables.

from herddb.

eolivelli avatar eolivelli commented on August 14, 2024

In theory while restoring the database the CLI should convert the INSERT statements to statements with placeholders ('?'),
it looks like the planner is parsing huge SQL statements.

You can try to do the dump with the --extended-insert mode in order to have smaller INSERT statements

from herddb.

ouovowo avatar ouovowo commented on August 14, 2024

oops, i didn't specify max memory size, just letting it by default. But it might be 4gb according to my observation.
Thanks for advice. I will have a try with changing the JVM configuration. But --extended-insert mode seems to be enabled by default. it has split the complete INSERT into parts, each part is 1MB.
Btw, should i comment out CREATE DATABASE, SET, USE, LOCK,... statements? It seems that even with --mysql, these statement cannot be dealt properly? To avoid unknown problems, i have commented them out.
Or is there any convenient way to load data from .csv file just like LOAD DATA in mysql.

from herddb.

eolivelli avatar eolivelli commented on August 14, 2024

Are you able to provide a sample of the dump file ?
usually restoring mysql dumps works well out of the box, but it has been passed quite some time that I did it

maybe @aluccaroni can share some suggestions about the command to use to dump the mysql files (I remember we tested importing databases for some widely used applications)

from herddb.

eolivelli avatar eolivelli commented on August 14, 2024

I have re-read the docs for mysqldump
actually you would have to try to disable extended inserts
and this seems possible by using --skip-opt

because otherwise (as you say) it is enabled by default

from herddb.

ouovowo avatar ouovowo commented on August 14, 2024

Cheers! It seems work well now by adding --extended-insert=FALSE, though it's quite slow. Thanks so much.

from herddb.

aluccaroni avatar aluccaroni commented on August 14, 2024

@eolivelli I don't have the procedure on hand on how we exported and imported into herd the few production mysql database we used to have (in the last few years we mainly created new herd installation without any migration), but using the "--skip-opt" option was pretty much the standard on our mysql backup procedures, so it's very likely that we used that at the time.

from herddb.

ouovowo avatar ouovowo commented on August 14, 2024

It seems that --skip-opt is not the key. Problem occurs only when continuous inserting tuples into large or GIANT table. Due to the limit of my device performance, my only solution is to restart the server every certain times of insertion to avoid catastrophic gc overhead. Troublesome, but simple and effective.

from herddb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.