我正在运行crontab,如下所述:
* 1 * * * /var/fdp/reportingscript/an_outgoing_tps_report.pl
* 1 * * * /var/fdp/reportingscript/an_processed_rule_report.pl
* 1 * * * /var/fdp/reportingscript/sdp_incoming_traffic_tps_report.pl
* 1 * * * /var/fdp/reportingscript/en_outgoing_tps_report.pl
* 1 * * * /var/fdp/reportingscript/en_processed_rule_report.pl
* 1 * * * /var/fdp/reportingscript/rs_incoming_traffic_report.pl
* 1 * * * /var/fdp/reportingscript/an_summary_report.pl
* 1 * * * /var/fdp/reportingscript/en_summary_report.pl
* 1 * * * /var/fdp/reportingscript/user_report.pl
Run Code Online (Sandbox Code Playgroud)
并收到错误:(对于所有脚本,错误是相同的)
DBI connect('dbname = scs; host = 192.168.18.23; port = 5432','postgres',...)失败:致命:抱歉,已经有太多客户在/var/fdp/reportingscript/sdp_incoming_traffic_tps_report.pl第38行.
此外,如果我一次手动运行一个脚本,它不会显示任何错误.
为了您的参考,我附上了我已经显示上述错误的脚本:
#!/usr/bin/perl
use strict;
use FindBin;
use lib $FindBin::Bin;
use Time::Local;
use warnings; …Run Code Online (Sandbox Code Playgroud)