[英]Play Framework tmp disk full with class files
In production mode play (version 1.2.6) writes compiled class files into the app/tmp/bytecode
and app/tmp/classes
folder. 在生产模式下,播放(版本1.2.6)将已编译的类文件写入
app/tmp/bytecode
和app/tmp/classes
文件夹。
It seems like those files are never cleaned up and not recycled per request. 似乎这些文件从未被清理过,而且每个请求都不会被回收。 After a few hours runtime the disk of my ec2-box is full with gigabytes of class files.
几个小时的运行后,我的ec2-box的磁盘已装满千兆字节的类文件。
What am I supposed to do? 我应该做些什么? Is there a config option I missed?
我错过了配置选项吗?
Do I have to clean the tmp folder myself with a cron job? 我需要自己执行cron作业来清洁tmp文件夹吗? If so, is it safe to delete the class files while the system is running?
如果是这样,在系统运行时删除类文件是否安全?
I found the problem myself. 我自己发现了问题。 A template was rendered from a string and not from a file.
模板是从字符串而不是文件中渲染的。 On each request the template was assigned a new random name.
根据每个请求,为模板分配了一个新的随机名称。
And all the random named class files were stored in the temp directory and play does not clean the temp directory. 并且所有随机命名的类文件都存储在temp目录中,而play不会清除temp目录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.