Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Database/DataSnap/Server    [ Add a report in this area ]  
Report #:  130358   Status: Open
DataSnapServer happen Access violation error when TServerMethods inherited TDSServerModule
Project:  Delphi Build #:  21.0.17707.5020
Version:    21.0 Submitted By:   hqun zhu
Report Type:  Basic functionality failure Date Reported:  3/4/2015 12:49:50 AM
Severity:    Serious / Highly visible problem Last Updated: 7/13/2015 4:08:59 AM
Platform:    All versions Internal Tracking #:   65068
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
create DataSnap Server as wizard, TServerMethods is:

  TServerMethods1 = class(TDSServerModule)
  private
    { Private declarations }
  public
    { Public declarations }
    function EchoString(Value: string): string;
    function ReverseString(Value: string): string;
  end;

.....

use ab.exe test, server happen accesss violation error.

but TServerMethods1 = class(TDataModule) or TComponent, it is ok
Steps to Reproduce:
see attachments.
step:
1. create DataSnap Server as wizard, and select Http, ServerMethod ancestor is TDSServerModule
2. run it(not in delphi)
3. run abTest.bat, or ab -n 10000 -c 20 http://127.0.0.1:8080/datasnap/rest/tservermethods1/%%22EchoString%%22/1234567890
4.open iexplorer, and input: http://127.0.0.1:8080/datasnap/rest/TServerMethods1/EchoString/1234567890
5.refresh ie continue
6. after a moment has error: {"error":"Access violation at address 00423828 in module 'TestConcurrencyServer.exe'. Read of address 0000002C"}

7. create anothor DataSnap Server as wizard, and select Http, ServerMethod ancestor is TDataModule or TCompoent,
repeat 2-6, it is ok


ps:
1. my Notebook HP450, 8GMemory, cpu i5-3210M @ 2.50GHz 2.50GHz, win7x64
2. if run in delphi(debug), need increase requests(-n) and  concurrency(-c), for example:
    ab -n 90000 -c 40 http://127.0.0.1:8080/datasnap/rest/tservermethods1/%%22EchoString%%22/1234567890
3. if test pc is better than me, perhaps need need increase requests(-n) and  concurrency(-c)
Workarounds
None
Attachment
dsServerConcurrent.zip
Comments

None

Server Response from: ETNACODE01