Login  
Search All Forums
Dart Home | PowerTCP WebServer for ActiveX | Custom Development Reply | PowerTCP WebServer for ActiveX Topics | Forums   
AuthorForum: PowerTCP WebServer for ActiveX
Topic: Access Violation On Large POSTs
rowens

From: Santa Ana, CA USA
Posts: 12
Member Since: 04/21/04
posted April 21, 2004 6:26 PM

I am using Delphi 5 and the Web Server tool (non-blocking) and have an application that works perfectly fine until a very large transaction is posted.

With a post size somewhere between 300K and 700K, the Web Server throws a stack overflow exception:

Exception EStackOverflow in module DartWebServer.dll at 00013C07. Stack Overflow.

I just downloaded the latest update, and that did help. Prior, I was getting an access violation with sizes under 300K.

This exception seems to be happening completely outside the control of my program and happens before the OnPost event is fired off from the Tool.

Is there a restriction on the maximum POST size allowed? If not, is there a setting or something I can do to eliminate this problem?

I have a client program that was slated to be posting transaction in the several megabyte to possibly hunderds of megabyte range.

Thank you for your time.

-Randy
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted April 21, 2004 7:24 PM

Try downloading this file:

http://support.dart.com/downloads/DartWebServer-1.8.0.11.zip

and use the DLLs in there. These haven't been released yet, but we have been using them to power this forum for a while now and there have not been any problems.

rowens

From: Santa Ana, CA USA
Posts: 12
Member Since: 04/21/04
posted April 22, 2004 2:03 PM

Thank you for the quick reply.

Unfortunately, this did not solve the problem. I received the exact same error in the same way as before--no difference. Again, reducing the size of the posted data keeps things running smoothly as expected.

Any other thoughts?

-Randy
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted April 22, 2004 2:14 PM

There is a sample WebServer that comes with the product. Please tell me the exact steps I need to take to duplicate the problem as easily as possible.

rowens

From: Santa Ana, CA USA
Posts: 12
Member Since: 04/21/04
posted April 22, 2004 3:56 PM

That was a good idea. I retested using the sample server provided by Dart. This rules out any dumb things I might have introduced. Luckily (for me), the sample Dart Server does the same thing.

I did find something interesting on this, however. I took a string of numbers:

1234567890

I duplicated this 5 times on a line in an editor, and added 20,000 lines (1,000,000 characters not included CR/LFs). I posted this, and it worked fine!

I then took this line:

<Name Tag=12333>Randy Owens</Name>

I duplicated that 20,000 times and posted that (660,000 character not including CR/LFs). This causes an Access Violation in the DLL.

The Stack Overflow / Access Violation appears to be context sensative to size and content of the post. The size alone will not always cause the problem.

I hope this helps.

Thanks again.

-Randy
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted April 22, 2004 4:02 PM

It is unclear from your posting exactly what I need to do. What method do I use to do the posting? I don't want to spend time on this unless I am positive I am doing exactly what you are doing.
rowens

From: Santa Ana, CA USA
Posts: 12
Member Since: 04/21/04
posted April 22, 2004 4:15 PM

I'm sorry. I thought I had mentioned that I was performing a POST (not a get or a put). Maybe there's alternate ways to Post?

At any rate, I am using the DartWeb component to do the post. Here is a code snippet:

procedure Post(sURL, sPostData: String);
var
  oPost: OLEVariant;
  Header: OLEVariant;
begin
  oPost     := sPostData;
  HTTP.Timeout := 0;
  HTTP.URL   := sURL;
  gResult    := '';
  bPostFlag   := True;

  Session.HTTP.Post(oPost, Header, gResult, gHeaders, gUser, gPassword)
end;

gHeaders, gResult, gUser, and gPassword are global OLEVariants.

The WebServer and this client are both running on the same machine for my tests.

One more thing, the log on the WebServer (the one the DLL creates) contains the entire contents of the post. So, it would appear that the server is receiving everything before it blows up.

I hope this answers the question properly.

-Randy

Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted April 22, 2004 4:24 PM

You'd be surprised the things people are actually doing when the describe simple things on this forum.

Now that I know you are just doing a simple post I can try to duplicate the problem. Back in a few minutes ....
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted April 22, 2004 4:34 PM

Ok, I verified it, although I don't see the log entry. From the sound of what you are describing, we are think that the data is part of the url rather than data in the request.

This has been logged as issue #2579. Please contact David Harry (sales@dart.com) next week if I have not contacted you sooner.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted April 30, 2004 1:38 PM

I have a fix for you. Please contact Dave Harry (sales@dart.com) and request a fix for issue 2579. As soon as I get authorization I will email it to you.
rowens

From: Santa Ana, CA USA
Posts: 12
Member Since: 04/21/04
posted May 4, 2004 12:54 PM

I tried e-mailing Dave Harry as suggested back on the 30th, but I haven't recevied a reply. I am anxious to get the fix if possible.

Thanks for your help.

-Randy
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted May 5, 2004 12:20 PM

I apologize but we had a problem with our mail recently. Can you please resend the info to Dave? Sorry.
Reply | PowerTCP WebServer for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX