title: Unable to create thread pipe: Too many open files on CasperJS
body: <p>I have make a CasperJS script to grab all the images from many links. When I run it, it works for several minutes and after it throws me this error.</p>
  
  <p>And I don't know how to solve this problem.</p>
  
  <p>My CasperJS script:</p>
  
  <pre><code>casper.repeat(200, function() {
      casper.thenOpen('http://google.fr/', function() { // Get a new page
          res = this.evaluate(function(wsurl) {
              return JSON.parse(__utils__.sendAJAX(wsurl, 'POST', null, false));
          }, {wsurl: ajax_url});
      });
      casper.then(function(){
          this.wait(1000);
      })
      casper.then(function(){
          this.open(res.source); // Open it
      });
      casper.then(function(){
          this.wait(1000);
      });
      casper.then(function(){
          arr_img = this.getElementsAttribute('img', 'src');
      });
      casper.then(function(){
          arr_img.forEach(function(value, key){ // Grab the images
              var img = new Image();
              img.src = value;
              if(img.width &gt;= 337){
                  temp  = {};
                  temp['image']  = value;
                  temp['width']  = img.width;
                  temp['height'] = img.height;
                  arr.push(temp);
              }
              delete window.img;
          });
      });
      casper.then(function(){
          require('utils').dump(arr);
          // Save the array
      });
      casper.then(function(){
          this.clear();
      });
  });
  </code></pre>
  
  <p>My error:</p>
  
  <pre><code>QEventDispatcherUNIXPrivate(): Unable to create thread pipe: Too many open files
  2014-09-20T15:37:27 [FATAL] QEventDispatcherUNIXPrivate(): Can not continue without a  thread pipe
  Abort trap: 6
  </code></pre>