Insufficient space for shared memory file: Failed to create cache dir

Java HotSpot(TM) 64-Bit Server VM warning: Insufficient space for shared memory file:
   21636
Try using the -Djava.io.tmpdir= option to select an alternate temp location.

Exception in thread "main" java.lang.IllegalStateException: Failed to create cache dir
    at io.vertx.core.file.impl.FileResolver.setupCacheDir(FileResolver.java:332)
    at io.vertx.core.file.impl.FileResolver.<init>(FileResolver.java:87)
    at io.vertx.core.impl.VertxImpl.<init>(VertxImpl.java:168)
    at io.vertx.core.impl.VertxImpl.vertx(VertxImpl.java:93)
    at io.vertx.core.impl.VertxFactoryImpl.vertx(VertxFactoryImpl.java:34)
    at io.vertx.core.Vertx.vertx(Vertx.java:85)
    at D5000DataService.runExample(D5000DataService.java:37)
    at D5000DataService.main(D5000DataService.java:20)
    
The core problem is lack of line left to shared memory file space. vertx need to create cache directory when using Http service. Under Linux user login corresponding tmp folder, create vertx cache directory. If the tmp folder is full, can no longer be placed in the cache file, the server and the deployment of more services, you can not delete, afraid it works or you lack permission, never let the delete, it will cause this problem.
Lack of space shared memory file, you can change the login user, the default cache directory created position will change.
If you do not want to change the login user, you can explicitly create change vertx cache directory location. The java -cp jar package path of program entry class name, written as:. Java -Djava.io.tmpdir = / tmp jar package path of program entry class name. ./tmp for the tmp file in the current directory folder Note This folder is created in advance.
If you do not want to create a cache directory, vertx.disableFileCPResolving = true should be suitable for you, there is a vertx.disableFileCaching = true setting, recommended the former. Both Application Reference: https: //github.com/eclipse-vertx/vert.x/issues/1931. About the cache directory to create a source reference: https://www.cnblogs.com/cmfa/p/10550757.html

Guess you like

Origin blog.csdn.net/haoranhaoshi/article/details/92728247