はじめに さくらVPSにWebスクレイピング用途でPuppeteerアプリケーションを置いて毎日定時実行していましたが、スクレイピングの関数をマルチで実行すると動いていなかったようだったのでマルチスレッドで起動する方法を調べました。 スクレイピングを関数単位でcronで時刻指定起動していたんですが、時刻がバッティングするとほぼ落ちていました。しかもchromeのプロセスが残ってそれ以降の時刻指定のジョブが動かないという。 自動ツールってめちゃくちゃ便利ですけど、動かない時のダメージがでかいんですよね。。 なお、Puppeteerの基本的な使い方はこちらの記事で紹介しています。 https://kennejs.com/entry/2019/01/18/020001 1. サーバの性能を確認する 同じ事象が発生している人はまず、サーバの処理性能を確認して見ましょう。 puppeteerってch