简体   繁体   English

服务器在发送数据之前关闭连接的原因是什么?

[英]What would be the cause of server closing a connection before data was sent?

I have a cakephp (1.3.10) application that seemed to work fine, but recently I get an error page that shows "No data received" in chrome. 我有一个Cakephp(1.3.10)应用程序,看起来工作正常,但是最近我得到了一个错误页面,该页面在Chrome中显示“未接收到数据”。 This happens randomly on various pages and in various browsers. 这在各种页面和各种浏览器中随机发生。 I googled the the error and found only unrelated information. 我搜索了该错误,并仅找到不相关的信息。

I haven't changed any code or upgraded the framework nor did we do any updates on the server that is running the application. 我没有更改任何代码或升级框架,也没有在运行该应用程序的服务器上进行任何更新。

What could be the cause of this? 这可能是什么原因? Is this code related, if so where can I start looking to solve it in cakephp? 这段代码是否相关,如果可以的话,我在哪里可以开始在cakephp中解决它?

Any help will be greatly appreciated. 任何帮助将不胜感激。

If it happens randomly it might be an issue with your script running into an timeout or using too much memory. 如果它是随机发生的,则可能是脚本运行超时或使用过多内存而引起的问题。 I had this issue once with wordpress as wordpress sometimes calls an internal "cronjob" on page views from time to time. 我曾经在wordpress上遇到过这个问题,因为wordpress有时会不时在页面浏览量上调用内部“ cronjob”。

"No data received" could mean “未收到数据” 可能意味着

  • A problem in the web server Web服务器中的问题

  • a PHP script dying due toe a fatal error (although I think a 200 should always be emitted... depends on the server configuration I guess). 一个PHP脚本由于致命错误而死(尽管我认为应该始终发出200 ...取决于我猜的服务器配置)。

If you're using Apache, check out its error.log first. 如果您使用的是Apache,请先查看其error.log Chances are there is something enlightening in there. 那里有启发性的机会。

If that doesn't help, you could try logging your PHP errors into a file . 如果那没有帮助,您可以尝试将PHP错误记录到file中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM