Casperjs will get stuck when executed under nodejs. How to solve the problem?

  node.js, question

Google hasn’t found a solution for a long time ~ ~ ~ ~ I hope someone can solve it.
When I grabbed several pages, I didn’t know when the pages would get stuck. I checked the progress.

I used the process discovered by ps -ef | grep phantomjs and found that

501 21887 21457 00 2: 58 pm ttys0150:00.83

The execution time of Central Processor here keeps increasing. I suspect that I did not execute my script command at all, because my casperjs inside has an onwaitTimeout monitoring timeout event, so would you like to know if you have encountered this situation?

The following is my casper script:

var fs = require('fs');
 var casper = require('casper').create({
 clientScripts: [
 'include/jquery.js', // These two scripts will be injected in remote
 ],
 pageSettings: {
 loadImages: false, // The WebPage instance used by Casper will
 loadPlugins: false // use these settings
 },
 logLevel: "info", // Only "info" level messages will be logged
 verbose: false, // log messages will be printed out to the console
 stepTimeout:10000,
 viewportSize:{width: 1280, height: 768},
 onWaitTimeout:function(){
 this.echo('-----output-----timeout-----output end-----','Info');
 bracket
 });
 
 casper.userAgent('Mozilla/5.0 (Macintosh;   Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36');
 var content = {};
 var address = casper.cli.get(0);
 
 casper.start(address);
 
 casper.waitForSelector(".detail-info", function() {
 This.echo ('-output-'plus this.evaluate(function() {
 return $('.brief a').attr('href');
 }) plus'-'outputend-','info');  // Will be printed in green on the console
 });
 
 
 casper.then(function(){
 this.captureSelector('twitter2.png', 'html');
 })
 
 casper.run();

this.exit()