php-general | 2001122
Date: 12/18/01
- Next message: Andrey Hristov: "[PHP] Re: $PHPSESSID on PHP 4.1.0"
- Previous message: Jan Maska: "Re: [PHP] php in free()"
- In reply to: Jan Maska: "Re: [PHP] php in free()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
This is because the reading from socket is blocked_read by default. So there is fuinction socket_set_blocking() and also
socket_set_timeout().
I had the same problem so as workaround set_time_limit(0) but the script works for 40 !! seconds. My aim was to get some header so I
didn't read from the socket until feof($fp) but stopped somewhere before the end of data and close()-ing socket after that. After
this intervention the time which the scripts uses is 4!!! seconds.
Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS
----- Original Message -----
From: "Jan Maska" <Jan.Maska <email protected>>
To: <php-general <email protected>>
Sent: Tuesday, December 18, 2001 11:07 AM
Subject: Re: [PHP] php in free()
> I'm not sure which way you create the connection, but I suppose that you use
> FSockOpen..
>
> This is a buggy function, as far as I know..
> Zend promised to take care of it in the 4.0.4 release of PHP, but since that
> nothing has changed, apparently.
> I had the same problem some week ago. In the end I had to use PERL script
> via PHP function exec().
>
> And here's the bug:
> After calling a socket, PHP interpreter simply keeps all data in memory,
> doesn;t close connection, keeps trying to read, and finaly stucks.. which
> can lead to an extreme overload on your server (tried it on Apache and IIS).
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andrey Hristov: "[PHP] Re: $PHPSESSID on PHP 4.1.0"
- Previous message: Jan Maska: "Re: [PHP] php in free()"
- In reply to: Jan Maska: "Re: [PHP] php in free()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

