Re: Why does file_get_contents take twice the time of default_socket_tieout when timeout occurs?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31/03/2015 05:09, masahiro_honma wrote:
> I use file_get_contents to access to a web api.
> It's timeout is set by default_socket_timeout.
> When a web api took a long time to response, of course file_get_contents timed out.
> But It seemed strange. file_get_contents took more time than default_socket_timeout.
>
> For reproducing this problem,
> I prepared the program that took enough time to cause timeout and I tested file_get_contents.
> As a result, I found that file_get_contents takes twice the time of default_socket_tieout when timeout occurs.
> For example, when I set default_socket_timeout to 3 sec, file_get_contents takes 6 seconds to return the result.
>
> Why does file_get_contents take twice the time of default_socket_tieout when timeout occurs?
>
Hello Masahiro

I am sorry to respond so late to your message - did you resolve this
problem?

Rich

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux