Having connection timeout problem when calling a php script while downloading a file from the same server.

This is a discussion on Having connection timeout problem when calling a php script while downloading a file from the same server. within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi, My dot net client downloads files and checks for any new files time to time. The server is apache2....


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-04-2006
just.starting@gmail.com
 
Posts: n/a
Default Having connection timeout problem when calling a php script while downloading a file from the same server.

Hi,
My dot net client downloads files and checks for any new files time to
time. The server is apache2.0.53 server. So what happens is that my
file download thing works fine if I dont try to call any page from the
server while downloading. If I try to call a single page while
downloading a file then the page request goes time out and the server
then closes the existing download stream and the client doestn't throw
any exception. So many a time I end up with incomplete downloaded file.
The server side code is in PHP and every thing like calling a page or
downloading a file is done by calling some PHP script.

What is the reason behind this type of behaviour.Has this anything to
do with PHP and server settings.
Thanx.

Reply With Quote
  #2 (permalink)  
Old 01-05-2006
Colin McKinnon
 
Posts: n/a
Default Re: Having connection timeout problem when calling a php script while downloading a file from the same server.

just.starting@gmail.com wrote:

> Hi,
> My dot net client downloads files and checks for any new files time to
> time. The server is apache2.0.53 server. So what happens is that my
> file download thing works fine if I dont try to call any page from the
> server while downloading. If I try to call a single page while
> downloading a file then the page request goes time out and the server
> then closes the existing download stream and the client doestn't throw
> any exception. So many a time I end up with incomplete downloaded file.
> The server side code is in PHP and every thing like calling a page or
> downloading a file is done by calling some PHP script.
>
> What is the reason behind this type of behaviour.Has this anything to
> do with PHP and server settings.


If it did with other clients, it would be useless as a web server. A real
web session will begin by loading, say a web page and begin parsing it. It
may then use the same socket connection (if keep-alive is enabled) to start
downloading a CSS file referenced by the page and open a new socket to
start downloading an image.

Many seperate machines may use the same proxy - but the webserver canot
differentiate between them. If you really tried you could configure apache
to only allow one request at a time, but it still wouldn't behave like this
(subsequent requests would back up until the first request finished or
timed out).

> My dot net client


Ahh. Microsoft. That's half the problem.

The problem is certainly client-side - you seem to be using the same
instance of the downloader to download more than one file - which it
obviously is not capable of.

HTH

C.



Reply With Quote
  #3 (permalink)  
Old 01-06-2006
just.starting@gmail.com
 
Posts: n/a
Default Re: Having connection timeout problem when calling a php script while downloading a file from the same server.

Ahh. Microsoft. That's half the problem.(Nice one:( )

Can you tell me how the server side is configured like how many
connections per client to server is allowed. I think it should be like
max connection per session or something like that. For example all the
people behind NAT can connect to server and if there is a MAX limit on
the number of connections per ip to host, then if there are a lot of
people behind the same NAT then the server will block the others who
come to it after others.

Thanks.

Reply With Quote
  #4 (permalink)  
Old 01-06-2006
just.starting@gmail.com
 
Posts: n/a
Default Re: Having connection timeout problem when calling a php script while downloading a file from the same server.

Ahhhhhhhhhhh....
There is another problem. I have kept some files at the server for
testing purpose. There is one particular file arnd 3KB in size. I can
download other files fine(in case I dont access any other page in
between). But in case of that particular file the client disconnects
saying Unable to read data from transport connection. That means the
connection is being closed arbitrarily. But downloading other files
just works fine.
Need some help here.
Thanks.

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:33 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0