Results 1 to 3 of 3

Thread: 10.04 LTS -> 12.04 LTS Upgrade Causing PHP fgets() timeouts

  1. #1
    Join Date
    May 2007
    Beans
    3

    10.04 LTS -> 12.04 LTS Upgrade Causing PHP fgets() timeouts

    Hi all,
    Recently upgraded a pool of servers to 12.04 LTS from 10.04 LTS. One of the things I noticed mid-upgrade is that calls to fgets() to a socket opened with either pfsockopen(), fsockopen(), or stream_socket_client() will occasionally fail when calling fgets(). My read timeout is set to 500000 micro seconds (half a second), which had no problems on 10.04.

    I've tried several things to fix this from an application standpoint, but none seem to have any effect. The output of stream_get_meta_data() after a failure is this:

    Code:
    ret= stream_type=tcp_socket/ssl mode=r+ unread_bytes=0 seekable= timed_out=1 blocked=1 eof=
    So it the socket is timing out. I've tried searching around, but couldn't find a similar issue/solution anywhere. Anyone have any experience with this? I'm trying to connect to another server on my network that's currently still running 10.04 (would be a pain to upgrade this). The error rate is fairly low, but still happens ~200 times every 5 minutes.

    Any help is appreciated, and sorry if I posted this in the wrong section.

  2. #2
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 10.04 LTS -> 12.04 LTS Upgrade Causing PHP fgets() timeouts

    Clone both machines and see if the same issue occurs if you upgrade both.

    What application is using php, Apache, Nginx, something else?
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  3. #3
    Join Date
    May 2007
    Beans
    3

    Re: 10.04 LTS -> 12.04 LTS Upgrade Causing PHP fgets() timeouts

    Quote Originally Posted by CharlesA View Post
    Clone both machines and see if the same issue occurs if you upgrade both.

    What application is using php, Apache, Nginx, something else?
    Thanks for your response!

    I have about 40 of one of the machines (Apache), and about 12 of the other running.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •