php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50281 Socket shuts down automatically after X seconds of idling
Submitted: 2009-11-24 09:46 UTC Modified: 2009-11-26 02:41 UTC
From: jiangcat at gmail dot com Assigned:
Status: Closed Package: Sockets related
PHP Version: 5.2.11 OS: Centos 5.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jiangcat at gmail dot com
New email:
PHP Version: OS:

 

 [2009-11-24 09:46 UTC] jiangcat at gmail dot com
Description:
------------
I've made a chat server using php socket features, and it works pretty well as I've expected. However, the server shuts down automatically after about 3 hours of idling (no connections).

I've set the php execution time limit to 0, and running this script from shell in the background. Can't think of any other reason causing this strange behavior.

Reproduce code:
---------------
The code is too long to submit.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-24 17:22 UTC] kalle@php.net
Please somehow attach the code to the bug report else theres not really anything we can do to analyze the issue. Try upload a zip somewhere if its many files or use a paste service like Pastie.

Also keep the reproduce code as short as possible, when you have attached the code to this report then change the status back to 'Open'
 [2009-11-24 19:03 UTC] srinatar@php.net
cool you are running it on linux. now, to help us debug this issue, provide a strace(1) output (just before the socket timeout happens). say, you see that socket times out at 3 hours or some thing like that, then you could do some thing like start the strace collection output around this time and paste the last few hundred lines some where. this should help us understand why did the socket time out when it happens


 [2009-11-26 02:41 UTC] jiangcat at gmail dot com
Hi guys. Thanks for your attention and hints. After running a strace program, I've found the real issue with in it. It was a mysql connection timeout causing the PHP encountering a fatal error, and shuts down the server.

This ticket is closed now, and thank you all again for your time.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 23:01:28 2024 UTC