bash
[0.007s][warning][os,thread] Failed to start thread "GC Thread#0" - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.
[0.007s][error ][gc,task ] Failed to create worker thread
解决办法 1 (使用docker启动的情况,添加--privileged=true)
bash
docker run --name server --privileged=true server
解决办法2 (使用docker-compose,在server底下加上privileged: true,然后重新执行docker-compose up -d)
yml
#vim docker-compose.yml
version: "3"
name: system
services:
redis:
container_name: redis
image: redis:6-alpine
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis:/data
server:
container_name: server
build:
context: ./server/
image: server
restart: unless-stopped
ports:
- "8080:8080"
ulimits:
nproc: 65535
# 主要的是这里
privileged: true
depends_on:
- redis