[Xitami] CGI issues

RPO rolinger1 at hotmail.com
Thu Aug 25 20:49:09 CEST 2005


Ok, I found my own problem but would still like some input.

The line in my perl script...
 # slow things down so that the user can actually see the progress bar.
 select(undef, undef, undef,0.35); # sleep for 0.2 of a second.

..choked the bandwidth for the upload (really choked it, down to about 30k per second) and allowed the /postdata$sessionid file to be created.  Another script in a popup window was monitoring the status of that TMP /postdata$sessionid file to create the actual Progress Bar.  I comment out the "select(undef....) line and my script now uploads at about 250k per second and doesn't error out.  However, with that line commented out /postdata$sessionid never gets created which means the popup window script can't ever create the Progress Bar.  

Any takers on this one?
  ----- Original Message ----- 
  From: RPO 
  To: xitami at lists.xitami.org 
  Sent: Thursday, August 25, 2005 11:36 AM
  Subject: [Xitami] CGI issues


  I am not certain if my problem is related to my script or to the Xitami CGI settings

  ##### script
  I have written a perl script to upload files via the web.  In order to create a Progress Bar I am bypassing the CGI module in Perl and am process the raw STDIN directly and store it to a temporary file, after this code below I then use perl CGI.pm to parse the contents of that TMP file.  It all works fine however any file over 300k causes the server to return this error: "This server is currently overloaded - please try again later", here is my perl code that is getting the POST STDIN:

  open (TMP,">$base_dir/postdata$sessionid") ;
  while (read (STDIN ,$LINE, 2048) && $bRead < $len ) {
   $bRead += length $LINE;
   $size = -s "$base_dir/postdata$sessionid";

   # slow things down so that the user can actually see the progress bar.
   select(undef, undef, undef,0.35); # sleep for 0.2 of a second.

   $i++;
   print TMP $LINE;
  }

  ##### Xitami CGI settings
  Or is this an issue with my CGI settings in Xitami:
      Server Settings:
          Allow Keep-Alive-Connections?   CHECKED, allow up to 25 requests, close after 30 seconds
          Server performance: Normal
      CGI Settings:
          Timeout for CGI programs: 60 seconds
          Check CGI progress every: 200 msecs
          Support 16bit CGI: CHECKED
          Use standard I/O: CHECKED
          Full Environment: CHECKED
         

  Anyone have any insights into why this would be occurring?  Is it script parameters or is it Xitami CGI settings?


------------------------------------------------------------------------------



  --
  Xitami Users Mailing List -- For Xitami support
  To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.imatix.org/pipermail/xitami/attachments/20050825/0f7954a3/attachment.htm


More information about the Xitami mailing list