为什么我的 Perl 脚本无法在 FastCGI 下启动?

发布于 2024-07-26 09:06:24 字数 652 浏览 4 评论 0原文

我在我的 Perl CGI 应用程序之一的 error_log 中收到此错误。 我很确定我根本没有更改我的脚本,突然间我开始收到此错误。

这是我在 error_log 中看到的内容:

[Wed Jul  8 15:18:20 2009] [warn] FastCGI: server "/local/web/test/cgi-bin/test.pl" (pid 17033)
    terminated by calling exit with status '255'
[Wed Jul  8 15:18:20 2009] [warn] FastCGI: server "/local/web/test/cgi-bin/test.pl"
    has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds

(为了清晰起见,对代码段进行了编辑)

另外,AddHandler 行FastCGI 存在于配置文件中。

谁能告诉我这个错误的可能原因吗? Apache 日志中没有任何记录。

I am getting this error in error_log one of my Perl CGI application. I am pretty sure I haven't changed my script at all and all of a sudden i have started getting this error.

This is what I see in error_log:

[Wed Jul  8 15:18:20 2009] [warn] FastCGI: server "/local/web/test/cgi-bin/test.pl" (pid 17033)
    terminated by calling exit with status '255'
[Wed Jul  8 15:18:20 2009] [warn] FastCGI: server "/local/web/test/cgi-bin/test.pl"
    has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds

(The snippet was edited for clarity)

Also, the AddHandler line for FastCGI exists in the config file.

Can any tell me the possible reasons for this error?
There is nothing recorded in Apache logs.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

伴我老 2024-08-02 09:06:24

以下两个提示可能会有所帮助(假设您的应用程序遵循 fastcgi 协议):
1. 尝试在命令行中运行应用程序,这证明您有执行位并且代码中没有编译错误。
2. 检查 apache 服务器的 suexec.log,这可能会显示与您的脚本相关的用户/组或其他错误。

Here are two tips that might help (assuming your app is respecting the fastcgi protocol):
1. try to run the app in command line, this prove that you have execute bit and no compile errors in code.
2. check suexec.log of your apache server, this might show user/group or other errors related to your script.

鼻尖触碰 2024-08-02 09:06:24

您可以尝试从 Perl 脚本重定向 STDERR,例如:

BEGIN { open STDERR, '>stderr.log' }

如果您的 stderr.log 文件根本没有创建,则意味着该脚本没有创建即使被执行,也可能是 suexec/权限问题。 否则,该文件中的 Perl 脚本应该有任何问题。

You could try redirecting the STDERR from your Perl script, something like:

BEGIN { open STDERR, '>stderr.log' }

If your stderr.log file doesn't get created at all, it means that the script didn't even get executed, likely a suexec/permissions problem. Otherwise, you should have whatever went wrong with the Perl script in that file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文