in reply to Re^3: CGI page sometimes do not loading, apache write error
in thread CGI page sometimes do not loading, apache write error

According to the log messages, the connection is being closed client-side, i.e. by the browser, a proxy, or whatever other network problem in between apache and the browser. So that's what you'd have to focus on.

Yes i think ,i need to search deeper in that direction, too.

You could try a commandline tool such as wget, or LWP::UserAgent or lwp-dump from libwww-perl, etc. to see whether you then get the entire html (without images). Maybe the loading of the many images is somehow exceeding some local resource limit, so something in between (proxy, network monitoring?) is terminating the request(s)... Just a guess.

The problem is not in amount of images, because it can stops before even some images code begins to generate, sometimes(when it is ok) it shows the whole form with 500 images.

But i think later(if i can`t solve this problem) i have to try all this

BTW, what browser are you using? Have you tried a different one? Also, is this happening systematically or sporadically (with the same page)?

I tried firefox 3.6.0, 3.6.2 , opera 10.10. Got same troubles.

P.S. Thanks for trying to help, i am first day here and did not expect so fast answers

P.S.2. I do not know may i post here the link to my page(about which we are talking) and because of this i did not print link here earlier, but it is the time i think, here it is, i will delete it if i break some rules of this site(i am first day here as i said, so did not know all policy here :) ). So you can see something works, the lightweight pages generated by simple functions in tabs named "Flickr best..." and "Flickr upload..." works fine(because it generates in a moment(1-3sec) that is my guess), but i have the problems with pages under the next two tabs"exif..." and "Batch...."(but you can`t look these pages because you need to have flickr account for it :( ), but it generates something like this

<form> <div id=$foo> <img> <input type=hidden> <text>some text</text> </div> </form>
And there can be up to 500 divs <id=$foo> like above, and i think there will be no problem if it will be generates in a moment, but to print one of this div i gather information for it in 1-3 seconds, so the page generates slowly.

Replies are listed 'Best First'.
Re^5: CGI page sometimes do not loading, apache write error
by almut (Canon) on Mar 24, 2010 at 11:52 UTC
    ... i think there will be no problem if it will be generates in a moment

    To figure out whether the issue is in fact time related, you could (for debugging purposes) pre-generate one of your large pages from the commandline by redirecting the CGI's output to a file

    (in your cgi-bin directory on the server) $ ./simashin.cgi param1=value1 param2=value2 ... >test.html

    Then try loading the resulting static html page via the same server (put the test.html into htdocs/... or wherever, not in cgi-bin/, of course).  See the debugging section in the CGI docs for details.

      So, i made some tests. I generated 200 pages local - right on the server.

      perl simashin.cgi params > file_name.html

      The result is :

      • Each of 200 pages generates till the end -> </html> without any errors. So we can make conclusion, that the cgi script works fine
      • This static generated pages can easily load with browser. So we make the conclusion that problems not in content of page.

        So the problem can be only in connection(provider, home server, router, something that i can`t even imagine :) ...) or in apache

        Thinking about - how can i find the weak place

        I think it is time to some tests with LWP

Re^5: CGI page sometimes do not loading, apache write error
by ahmad (Hermit) on Mar 24, 2010 at 22:44 UTC

    Loading 500 images at once for the user is not practical, You should consider spliting the output into pages 25 image per page

    And as I can see you are using dynamic DNS which means you are probably using your home connection (might be slow?) or You might have a problem with your apache configurations.

      Loading 500 images at once for the user is not practical, You should consider spliting the output into pages 25 image per page

      This page is not for just looking on that, it is for editing some strings on flickr for each image. Moreover user choose the amount of pictures to see on this page, earlier when he search it, the max is 500.

      And as I can see you are using dynamic DNS which means you are probably using your home connection (might be slow?)

      I have to use this crazy dyDNS with this crazy page name :), because my provider said that they can only give me an external IP, but not the DNS zone support :(. i have 10mbit in each direction so it is far enough for this.

      or You might have a problem with your apache configurations.

      i did not change it hard from initial view. Only add my mail and bigger timeout. So it must work fine.