Jump to content

Http connection not closing after client receives all data


SICP

Recommended Posts

Hi, this is a tricky one to explain and nothing shows up in the search so I'll give it my best shot...

 

First some background:

Apache 2.2.4 on Ubuntu server 7.1 (128MB RAM) Virtual Private Server

Running a php/MySQL shopping cart application

 

Due to memory requirements of application MaxClients cannot be more than 3. Here's the rest of that section:

StartServers            2
MinSpareServers       2
MaxSpareServers      2
MaxClients               3
MaxRequestsPerChild 150
MaxMemFree            100

Timeout                   60
KeepAlive                 Off
MaxKeepAliveRequests 15
KeepAliveTimeout 1

 

The symptoms are that with a couple (yes just 2!) of people browsing the requests get queued and the site is unresponsive.

 

My first instinct was to blame the cart application, however, looking at server-status it appears that images are the problem.

 

what seems to be happening is that sometimes apache thinks it is still sending an image to the client even though the client has received it fine (showing as W on server status with SS slowly creeping up to 60), meanwhile all other requests are queued. Even server-status is stuck waiting for a response and when it finally gets there Req for that image was 60000 or there abouts.

 

I'm using 2 PCs each with IE and Firefox (so up to 4 sessions consecutively) and I'm thinking it's one of three things:

 

  • Apache is configured wrong and is not closing the connection when it should
  • One of the clients is not closing the connection properly
  • Something in between
          a. My ISPs proxy server is not closing the connection
          b. My DSL router is not closing the connection (NAT/PAT confusion perhaps?)

 

I'm really hoping someone has come across this before and I'm just doing something stupid. I thought it was KeepAlives at first which is why I've turned that off (it helped a bit I think) trouble is with only 3 for MaxClients it doesn't take much to clog things up - with it higher the server simply runs out of memory instead.

 

Cheers,

 

Rich

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.