安装完毕mycat之后执行./mycat console命令
输出以下错误信息:
wrapper | Launching a JVM...
wrapper | JVM exited while loading the application.
jvm 1 | Invalid maximum heap size: -Xmx4G
jvm 1 | The specified size exceeds the maximum representable size.
jvm 1 | Error: Could not create the Java Virtual Machine.
jvm 1 | Error: A fatal exception has occurred. Program will exit.
wrapper | Launching a JVM...
wrapper | JVM exited while loading the application.
错误原因:mycat默认需要的内存要求大于机器的实际内存,需要修改mycat的配置文件。
解决方法:找到.../mycat/conf/wrapper.conf,修改
wrapper.java.additional.10=-Xmx4G (大约在36行)
wrapper.java.additional.11=-Xms1G
改成:
wrapper.java.additional.10=-Xmx1G
wrapper.java.additional.11=-Xms256M
修改完成后,重新执行./mycat console