5 second lag when same image called multiple times in a short period of time

Discussion in 'Install/Configuration' started by wanah, Oct 17, 2013.

  1. wanah

    wanah Member

    Hello,

    I'm trying to find the setting that would cause a 5 minute lag when the same image is called about 10 times in a row from within a PHP script that's not CPU, memory or disk limited.

    One of our clients scripts does this and recently he's experiences lags over 5 seconds because of this.

    I belive the server's IP is whitelisted and I know litespeed webserver is far from using it's current allowed 4 cores.

    I've been through all the settings and things like make connections per client is set to 200 so this shouldn't be the limit that is hit. Here are my settings :

    Max connections : 5000
    Max keep alive requests : 10000
    Max static requests per second (per client) : 200
    Connection soft limit (per ip) : 80
    Connection hard limit (per ip) : 100
    Block Bad Request : No
    Enable Request Filtering : No

    What am I missing ?
  2. NiteWave

    NiteWave Administrator

    5 second or 5 minutes ?

    >the same image is called about 10 times in a row from within a PHP script
    can you show the example php script ? let's see if can reproduce at our lab.
  3. wanah

    wanah Member

    Hello,

    I haven't tried out of context.

    I'll try and reproduce the issue on a test account and let you know.

    It's 5 seconds not 5 minutes.

    It does the first 15 images in milliseconds then waits for 5 seconds before doing the 16th image then does the next four images in milliseconds.

    It doesn't happen every time (on average once evey 5 times) and never on the same call (because it's 20 times on the same small image hosted on the same account and it seems to block for 5 seconds when it hits a limit).
  4. NiteWave

    NiteWave Administrator

    it looks an interesting issue.

    you can do the tests on the server directly to compare the result.

    just use ab (apache benchmark). for exmaple,
    #ab -n 20 -c 1 website.com/img1.jpg

Share This Page