环境:阿里云ECS 2核+2G Centos7.9
docker版本 20.10.9
docker-compose.yaml内容如下:
version: "3"
services:
halo:
image: halohub/halo:2.1.0
container_name: halo
restart: on-failure:3
mem_limit: 700m
depends_on:
halodb:
condition: service_healthy
networks:
halo_network:
volumes:
- ./:/root/.halo2
ports:
- "8090:8090"
environment:
- SPRING_R2DBC_URL=r2dbc:pool:mysql://halodb:3306/halo
- SPRING_R2DBC_USERNAME=root
MySQL 的密码,请保证与下方 MYSQL_ROOT_PASSWORD 的变量值一致。
- SPRING_R2DBC_PASSWORD=12345678
- SPRING_SQL_INIT_PLATFORM=mysql
外部访问地址,请根据实际需要修改
- HALO_EXTERNAL_URL=http://localhost:8090/
初始化的超级管理员用户名
- HALO_SECURITY_INITIALIZER_SUPERADMINUSERNAME=admin
初始化的超级管理员密码
- HALO_SECURITY_INITIALIZER_SUPERADMINPASSWORD=12345678
halodb:
image: mysql:8.0.27
container_name: halodb
restart: on-failure:3
networks:
halo_network:
command: --default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
volumes:
- ./mysql:/var/lib/mysql
- ./mysqlBackup:/data/mysqlBackup
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "--silent"]
interval: 3s
retries: 5
start_period: 30s
environment:
请修改此密码,并对应修改上方 Halo 服务的 SPRING_R2DBC_PASSWORD 变量值
请修改此密码,并对应修改上方 Halo 服务的 SPRING_R2DBC_PASSWORD 变量值
- MYSQL_ROOT_PASSWORD=12345678
- MYSQL_DATABASE=halo
networks:
halo_network:
启动情况:
mysql能正常启动,halo退出
报错内容如下:
halo | [0.020s][warning][os,thread] Failed to start thread "VM Thread" - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.
halo | Error occurred during initialization of VM
halo | Cannot create VM thread. Out of system resources.
halo | [0.013s][warning][os,thread] Failed to start thread "VM Thread" - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.
halo | Error occurred during initialization of VM
halo | Cannot create VM thread. Out of system resources.
halo | [0.013s][warning][os,thread] Failed to start thread "VM Thread" - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.
halo | Error occurred during initialization of VM
halo | Cannot create VM thread. Out of system resources.
halo | [0.013s][warning][os,thread] Failed to start thread "VM Thread" - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.
halo | Error occurred during initialization of VM
halo | Cannot create VM thread. Out of system resources.
Name Command State Ports
halo sh -c java ${JVM_OPTS} org ... Exit 1
halodb docker-entrypoint.sh --def ... Up (healthy) 0.0.0.0:3306->3306/tcp,:::3306->3306/tcp, 33060/tcp
请教一下,这个问题怎么解决?谢谢