[PHP] Broken pipe

2005-10-02 Thread Ben-Nes Yonatan

Hi all,

I wrote a php script which is running very long queries (hours) on a 
database.
I seem to have a problem to run the code when there are single queries 
which take long times (like 5 hours for an update query), from the log 
of the database I received the following code:



2005-09-30 17:12:13 IDT postgres : LOG:  0: duration: 18730038.678 
ms  statement: UPDATE product_temp SET nleft=(SELECT
2005-09-30 17:12:13 IDT postgres : LOCATION:  exec_simple_query, 
postgres.c:1035
2005-09-30 17:12:13 IDT postgres : LOG:  08006: could not send data to 
client: Broken pipe

2005-09-30 17:12:13 IDT postgres : LOCATION:  internal_flush, pqcomm.c:1050
2005-09-30 17:12:13 IDT postgres : LOG:  08P01: unexpected EOF on client 
connection

2005-09-30 17:12:13 IDT postgres : LOCATION:  SocketBackend, postgres.c:287
2005-09-30 17:12:13 IDT postgres : LOG:  0: disconnection: session 
time: 6:04:58.52
2005-09-30 17:12:13 IDT postgres : LOCATION:  log_disconnections, 
postgres.c:3403



Now after the 5 hours update it need to echo into a log file a line 
which say that it ended this command (just for me to know the times), my 
assumption is that PHP read the code into memory at start and opened the 
connection to the file, after a time which he waited to any given life 
sign he gave up and closed the connection to the file, and when the 
code came back to the file it encountered no connection to the file 
(broken pipe).



Am I correct at my assumption? if so how can I set the PHP to wait how 
much I tell him?


Ofcourse if im wrong I would like to know the reason also :)


Thanks in advance,

 Ben-Nes Yonatan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php broken pipe

2004-11-17 Thread user
I did and the result is the same.
Could this be a bug in the pcntl_fork or pcntl_wait ?
The error occours after i the child died. The connection to the database 
is closed.

Thanks
Rui Francisco
Greg Donald wrote:
On Tue, 16 Nov 2004 09:59:57 +, Rui Francisco [EMAIL PROTECTED] wrote:
I'm using a query in loop and go through all records to do some operations
in the middle of the script i fork(); to do other things
When i return to the parent process i try to make one update and i get
the following error
[nativecode=Unable to complete network request to host 127.0.0.1.
Error writing data to the connection. Broken pipe]

You might try pcntl_fork() instead.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] php broken pipe

2004-11-16 Thread Rui Francisco
Hi,
i'm using firebird 1.5.1 on a linux machine with a php script
I'm using a query in loop and go through all records to do some operations
in the middle of the script i fork(); to do other things
When i return to the parent process i try to make one update and i get 
the following error
[nativecode=Unable to complete network request to host 127.0.0.1. 
Error writing data to the connection. Broken pipe]

And continue the loop of the records of the query.
Is this a regular beaviour ?  How can it be solved ?
I'm using Pear DB for database access.
Thank you in advance
Rui Francisco
--
Rui Francisco - [EMAIL PROTECTED]
FCCN - Fundação para a Computação Científica Nacional
Av. Brasil, 101  1700-066 Lisboa - Portugal
Tel: +351 218440100   Fax: +351 218472167
-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] php broken pipe

2004-11-16 Thread Greg Donald
On Tue, 16 Nov 2004 09:59:57 +, Rui Francisco [EMAIL PROTECTED] wrote:
 I'm using a query in loop and go through all records to do some operations
 in the middle of the script i fork(); to do other things
 When i return to the parent process i try to make one update and i get
 the following error
 [nativecode=Unable to complete network request to host 127.0.0.1.
 Error writing data to the connection. Broken pipe]

You might try pcntl_fork() instead.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Broken pipe: core_output_filter: writing data to the network

2003-09-25 Thread Martin Greco
Hi.
I have a Redhat 8 box with Apache 2.0.40, PHP 4.3.1, FreeTDS 0.61 working
MS-SQL2000 server.

When surfing any application sometimes when i hit a link or button the
application dies (it does not load anything, the crash is instantaneous) and
it shows this in the apache logs:

[Mon Sep 22 14:00:25 2003] [info] (32)Broken pipe: core_output_filter:
writing data to the network.

have no more data about this. I don't know if it is a Apache or PHP problem.

Any thoughts?

Thanks

-- 
###
# Martin Greco

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php