首页 > 其他分享 >Cannot run program "videostore: Too many open files

Cannot run program "videostore: Too many open files

时间:2022-12-15 14:38:26浏览次数:73  
标签:files run many subprocess pb streams input output proc


   java.io.IOException: Cannot run program "videostore": java.io.IOException: error=24, Too many open files

  ​​Javadoc​​ says:

The parent process uses these streams to feed input to and get output from the subprocess. Because some native platforms only provide limited buffer size for standard input and output streams, failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to block, and even deadlock.

  Secondly, ​​waitFor()​​ your process to terminate. You then should close the input, output and error streams.

  Finally ​​destroy()​​ your Process. 

 

 

Process proc=null;
try {
ProcessBuilder pb = new ProcessBuilder(params);
pb.redirectErrorStream(true);
proc = pb.start();
proc.waitFor();
} catch (Exception e) {
log.error("QtStore: ",e);
return;
}finally{
if(proc!=null) //关闭输入输出流,释放内存
proc.destroy();
}

  

标签:files,run,many,subprocess,pb,streams,input,output,proc
From: https://blog.51cto.com/u_1923895/5939822

相关文章

  • LeaRun.net代码生成器 一键生成前后端代码
    自动代码生成是指根据自然语言的功能描述来生成代码。在项目开发过程中,有很多业务模块的代码是具有一定规律性的,例如controller控制器、service接口、service实现类、mappe......
  • React报错之Too many re-renders
    总览产生"Toomanyre-renders.Reactlimitsthenumberofrenderstopreventaninfiniteloop"错误有多方面的原因:在一个组件的渲染方法中调用一个设置状态的函数......
  • HTMLTestRunner.py引用报错(StringIO)
    报错原因:Python3已将stringIO归入io,但下载的文件未修改解决办法:修改HTMLTestRunner.py文件1.第94行:importStringIO  ===>  importio2.第539行,self.output......
  • windows上用vs2017静态编译onnxruntime-gpu CUDA cuDNN TensorRT的坎坷之路
    因为工作业务需求的关系,需编译onnxruntime引入项目中使用,主项目exe是使用的vs2017+qt5.12。onnxruntime就不用介绍是啥了撒,在优化和加速AI机器学习推理和训练这块赫赫有名......
  • The Windows Native Ribbon Part 2: Setting Ribbon Properties at Runtime
    TheWindowsNativeRibbonPart2:SettingRibbonPropertiesatRuntime Downloaddemoapp:1.27MBContentsIntroductionCommandPropertiesSetti......
  • ScriptRunner Application
    ScriptRunnerApplicationDownloadprojectdemo-222.22KBDownloadsourcefiles-101.15KBIntroductionOneofthemostsoughtafterskillsfor......
  • AppRunner – Simple ‘desktop shortcut’ replacement
    AppRunner–Simple‘desktopshortcut’replacement Downloadsource-65.7KBDownloadexe-288.7KBIntroductionAppRunnerisasimpletool......
  • Rundeck概况
    1.Rundeck介绍RunDeck是用Java/Grails写的开源工具,帮助用户在数据中心或者云环境中自动化各种操作和流程。通过命令行或者web界面,用户可以对任意数量的服务器进行操作,大大降......
  • GaussDB(DWS)运维 :遇到truncate执行慢,怎么办?
    摘要:truncate执行慢,耗时长达几十到几百秒,这可怎么破?本文分享自华为云社区《GaussDB(DWS)运维--truncate慢》,作者:譡里个檔。【现象】truncate执行慢,耗时长达几十到几百......
  • KingbaseES中truncate和oracle中truncate区别
    truncate命令在KingbaseES中本质上区别于oracle。因为oracle中,数据文件datafile可以被表所共享,每张表被分配各自的连续的extents。而在KingbaseES中,数据文件是独立的,不同表......