为了添加上下文,我有一个 1GB 内存的小型服务器,我试图通过使用 docker-compose 对 ShinyProxy 进行 dockerizing 来部署许多闪亮的应用程序。
我在 ShinyProxy 上添加一个又一个应用程序并逐步测试它。它曾经适用于 4-5 个第一个应用程序,但现在当我使用 docker-compose up --build -d 构建我的容器时,我最终遇到了以下错误,我无法从中退出......
fatal error: runtime: out of memory
runtime stack:<br />
runtime.throw(0x55e484ea7241, 0x16)<br />
/usr/local/go/src/runtime/panic.go:617 +0x74 fp=0x7fff0428e880 sp=0x7fff0428e850 pc=0x55e4838d6084<br />
runtime.sysMap(0xc000000000, 0x4000000, 0x55e486e41e98)
/usr/local/go/src/runtime/mem_linux.go:170 +0xc9 fp=0x7fff0428e8c0 sp=0x7fff0428e880 pc=0x55e4838c1399<br />
runtime.(*mheap).sysAlloc(0x55e486e28980, 0x2000, 0x55e486e28990, 0x1)
/usr/local/go/src/runtime/malloc.go:633 +0x1cf fp=0x7fff0428e968 sp=0x7fff0428e8c0 pc=0x55e4838b41af <br />
runtime.(*mheap).grow(0x55e486e28980, 0x1, 0x0)
/usr/local/go/src/runtime/mheap.go:1222 +0x44 fp=0x7fff0428e9c0 sp=0x7fff0428e968 pc=0x55e4838ce7a4 <br />
runtime.(*mheap).allocSpanLocked(0x55e486e28980, 0x1, 0x55e486e41ea8, 0x0)
/usr/local/go/src/runtime/mheap.go:1150 +0x381 fp=0x7fff0428e9f8 sp=0x7fff0428e9c0 pc=0x55e4838ce691 <br />
runtime.(*mheap).alloc_m(0x55e486e28980, 0x1, 0x2a, 0x6e43a318)
/usr/local/go/src/runtime/mheap.go:977 +0xc6 fp=0x7fff0428ea48 sp=0x7fff0428e9f8 pc=0x55e4838cdce6 <br />
runtime.(*mheap).alloc.func1()
/usr/local/go/src/runtime/mheap.go:1048 +0x4e fp=0x7fff0428ea80 sp=0x7fff0428ea48 pc=0x55e4838fee0e <br />
runtime.(*mheap).alloc(0x55e486e28980, 0x1, 0x55e48301002a, 0x7fff0428eb20)
/usr/local/go/src/runtime/mheap.go:1047 +0x8c fp=0x7fff0428ead0 sp=0x7fff0428ea80 pc=0x55e4838cdfbc <br />
runtime.(*mcentral).grow(0x55e486e29780, 0x0)
/usr/local/go/src/runtime/mcentral.go:256 +0x97 fp=0x7fff0428eb18 sp=0x7fff0428ead0 pc=0x55e4838c0e17 <br />
runtime.(*mcentral).cacheSpan(0x55e486e29780, 0x7fbfd6083000)
/usr/local/go/src/runtime/mcentral.go:106 +0x301 fp=0x7fff0428eb78 sp=0x7fff0428eb18 pc=0x55e4838c0921 <br />
runtime.(*mcache).refill(0x7fbfd6083008, 0x2a)
/usr/local/go/src/runtime/mcache.go:135 +0x88 fp=0x7fff0428eb98 sp=0x7fff0428eb78 pc=0x55e4838c03b8 <br />
runtime.(*mcache).nextFree(0x7fbfd6083008, 0x55e486e1e82a, 0x7fbfd6083008, 0x7fbfd6083000, 0x8)
/usr/local/go/src/runtime/malloc.go:786 +0x8a fp=0x7fff0428ebd0 sp=0x7fff0428eb98 pc=0x55e4838b49ea <br />
runtime.mallocgc(0x180, 0x55e485b93c00, 0x1, 0x55e486e41f00)
/usr/local/go/src/runtime/malloc.go:939 +0x780 fp=0x7fff0428ec70 sp=0x7fff0428ebd0 pc=0x55e4838b5320 <br />
runtime.newobject(0x55e485b93c00, 0x4000)
/usr/local/go/src/runtime/malloc.go:1068 +0x3a fp=0x7fff0428eca0 sp=0x7fff0428ec70 pc=0x55e4838b572a <br />
runtime.malg(0x3cba6700008000, 0x55e486e2aff0)
/usr/local/go/src/runtime/proc.go:3220 +0x33 fp=0x7fff0428ece0 sp=0x7fff0428eca0 pc=0x55e4838df533 <br />
runtime.mpreinit(...)
/usr/local/go/src/runtime/os_linux.go:311 <br />
runtime.mcommoninit(0x55e486e22c40)
/usr/local/go/src/runtime/proc.go:618 +0xc6 fp=0x7fff0428ed18 sp=0x7fff0428ece0 pc=0x55e4838d8ea6 <br />
runtime.schedinit()
/usr/local/go/src/runtime/proc.go:540 +0x78 fp=0x7fff0428ed70 sp=0x7fff0428ed18 pc=0x55e4838d8b38 <br />
runtime.rt0_go(0x7fff0428ee78, 0x2, 0x7fff0428ee78, 0x0, 0x7fbfd56b4b97, 0x2, 0x7fff0428ee78, 0x200008000, 0x55e483900e80, 0x0, ...)
/usr/local/go/src/runtime/asm_amd64.s:195 +0x11e fp=0x7fff0428ed78 sp=0x7fff0428ed70 pc=0x55e483900fae
问题是每次我通过 ssh 连接到我的服务器时,每个 docker 命令都会导致此错误。我真的被它困住了,不知道如何摆脱。
我希望一些 docker 专业人士可以帮助我解决这个问题。
感谢和问候,
马克西姆