- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我对连接到 SOAP 1.2+WSDL 服务的 PHP 应用程序有一个奇怪的问题:
以前的信息:带有 php5-fcgi 模块的 Apache 服务器 2.4。我正在为 SOAP 服务开发客户端,我可以为该服务做一些请求。
请求需要一些时间才能完成。我需要做一个 set_time_limit(60) 因为如果我没有它,脚本会返回空闲超时错误:
FastCGI: comm with server "/usr/lib/cgi-bin/php5-fcgi" aborted: idle timeout (30 sec)
使用 set_time_limit,我得到了另一个不同的错误:
AH00524: Handler for fastcgi-script returned invalid result code 1
当我尝试执行 SOAP 请求时出现这些错误。没有它,页面工作正常。
由于日志中出现此错误,我在导航器上出现了另一个不同的错误。在 IE 上,页面无法加载,Firefox 显示“内容编码错误”页面。
如果我尝试在屏幕上显示 SOAP 连接结果(使用 var_dump),以及如果我尝试执行请求但未将其发送到屏幕,则会出现这些错误。
尝试搜索“内容编码错误”时,我找到了有关压缩的信息。我尝试在 set_time_limit 之前和之后执行“ob_start”,但是,当我尝试执行此操作时,我在日志中收到超时错误(我认为 PHP 不会更改超时),而且页面显示500 内部服务器错误。
有什么问题?我认为可能会出现这些问题的唯一选择是 Apache 和 php5-fcgi 模块之间的一些超时,但我不知道如何修改它以尝试另一个选项。
编辑:
我在同一台机器上有两台服务器,Apache2(2.4.10)+php5-fcgi(5.6.2)(HTTP端口80,HTTPS端口443),Nginx(1.6.2)+php5-fcgi(HTTP端口 8080)。
使用 Apache2 测试的同一页面在 HTTP 和 HTTPS 上不起作用(顶部描述的错误)。然后,我尝试用Nginx(相同的webroot,理论上相同的php5-fcgi配置)进入,然后,正常运行。
谢谢,
最佳答案
大多数情况下,当您使用 fastCGI 时出现空闲超时错误是由于 CGI 请求比空闲超时参数设置的时间长。如果不设置,则默认为 30 秒。
-idle-timeout n (30 seconds) The number of seconds of FastCGI application inactivity allowed before the request is aborted and the event is logged (at the error LogLevel). The inactivity timer applies only as long as a connection is pending with the FastCGI application. If a request is queued to an application, but the application doesn't respond (by writing and flushing) within this period, the request will be aborted. If communication is complete with the application but incomplete with the client (the response is buffered), the timeout does not apply.
在日志文件中你可以看到这样的东西:
[fastcgi:error] FastCGI: comm with server "/var/www/bin/php-fastcgi" aborted: idle timeout (30 sec), referer: http://example.org/script.php
在网络浏览器中,您会收到“内容编码错误”消息。
为避免此错误,可以增加 fastCGI 配置中的空闲超时。
FastCgiConfig -idle-timeout 900
因此,通过增加空闲超时,您不再需要使用 set_time_limit。
关于php - fastcgi 脚本的处理程序返回了无效的结果代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28751020/
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
在编码时,我问了自己这个问题: 这样更快吗: if(false) return true; else return false; 比这个? if(false) return true; return
如何在逻辑条件下进行“返回”? 在这样的情况下这会很有用 checkConfig() || return false; var iNeedThis=doSomething() || return fa
这是我的正则表达式 demo 如问题所述: 如果第一个数字是 1 则返回 1 但如果是 145 则返回 145 但如果是 133 则返回 133 样本数据a: K'8134567 K'81345678
在代码高尔夫问答部分查看谜题和答案时,我遇到了 this solution返回 1 的最长和最晦涩的方法 引用答案, int foo(void) { return! 0; } int bar(
我想在下面返回 JSON。 { "name": "jackie" } postman 给我错误。说明 Unexpected 'n' 这里是 Spring Boot 的新手。 1日龄。有没有正确的方法来
只要“is”返回 True,“==”不应该返回 True 吗? In [101]: np.NAN is np.nan is np.NaN Out[101]: True In [102]: np.NAN
我需要获取所有在 6 号或 7 号房间或根本不在任何房间的学生的详细信息。如果他们在其他房间,简单地说,我不希望有那个记录。 我的架构是: students(roll_no, name,class,.
我有一个表单,我将它发送到 php 以通过 ajax 插入到 mysql 数据库中。一切顺利,php 返回 "true" 值,但在 ajax 中它显示 false 消息。 在这里你可以查看php代码:
我在 Kotlin 中遇到了一个非常奇怪的无法解释的值比较问题,以下代码打印 假 data class Foo ( val a: Byte ) fun main() { val NUM
请注意,这并非特定于 Protractor。问题在于 Angular 2 的内置 Testability service Protractor 碰巧使用。 Protractor 调用 Testabil
在调试窗口中,以下表达式均返回 1。 Application.WorksheetFunction.CountA(Cells(4 + (i - 1) * rows_per_record, 28) & "
我在本地使用 jsonplaceholder ( http://jsonplaceholder.typicode.com/)。我正在通过 extjs rest 代理测试我的 GET 和 POST 调用
这是 Postman 为成功调用我的页面而提供的(修改后的)代码段。 var client = new RestClient("http://sub.example.com/wp-json/wp/v2
这个问题在这里已经有了答案: What to do with mysqli problems? Errors like mysqli_fetch_array(): Argument #1 must
我想我对 C 命令行参数有点生疏。我查看了我的一些旧代码,但无论这个版本是什么,都会出现段错误。 运行方式是 ./foo -n num(其中 num 是用户在命令行中输入的数字) 但不知何故它不起作用
我已经编写了一个类来处理命名管道连接,如果我创建了一个实例,关闭它,然后尝试创建另一个实例,调用 CreateFile() 返回 INVALID_HANDLE_VALUE,并且 GetLastErro
即使 is_writable() 返回 true,我也无法写入文件。当然,该文件存在并且显然是可读的。这是代码: $file = "data"; echo file_get_contents($fil
下面代码中的变量 $response 为 NULL,尽管它应该是 SOAP 请求的值。 (潮汐列表)。当我调用 $client->__getLastResponse() 时,我从 SOAP 服务获得了
我一直在网上的不同论坛上搜索答案,但似乎没有与我的情况相符的... 我正在使用 Windows 7,VS2010。 我有一个使用定时器来调用任务栏刷新功能的应用程序。在该任务栏函数中包含对 LoadI
我是一名优秀的程序员,十分优秀!