I'm having troubles with simultaneous requests using DBF tables and the ADS Local server (testing environment)...
when my webservice is processing about 3 requests concurrently which are manipulating the same tables I'm getting a error 6005 ACCESS_VIOLATION callend from DBUSEAREA()
I'm trying to track the problem and found out that from those 3 requests, the first 2 requests were processed as expected, but the third one is unable to open the file and then I get this error I just mentioned...
My function is manipulating the files like that:
- Code: Select all Expand view
- caliasage:= NewAlias("PX"+hData['nagenda'])
USE ( cDirDbf+ "\AGENDA.DBF" ) INDEX "AGENDA" ALIAS caliasage VIA "ADS" SHARED NEW
IF NetErr()
hResponse[ 'success' ] := .T.
hResponse['cod'] := "7"
hResponseCrypt['conteudo']:=hb_crypt(hb_jsonEncode(hResponse),AP_GetEnv( "ENCRYPT" ))
oController:oResponse:SetHeader("Authorization",hCookies)
oController:oResponse:SendJson( hResponseCrypt )
RETURN NIL
ENDIF
calias:= Alias(Select(caliasage))
newalias() is a function that is creating a Alias dynamically for my table, in order to avoid duplicated alias (advice from Charly)
As I said, I'm using ADS Local Server here in my testing environment, so is there any limitation about the opened tables?
When I'm sending a request that manipulates a table, this request will count as a different "user" (different connection) everytime?
the error in my apache error.log:
- Code: Select all Expand view
- Unrecoverable error 6005: Exception error:
Exception Code:C0000005 ACCESS_VIOLATION
Exception Address:00007FFB74AB3416
RAX:0000000000000000 RBX:000001BDA3CAEF60 RCX:000001BDA3CAEF60 RDX:00000000FFFFFFFA
RSI:0000000000000000 RDI:0000000000000000 RBP:000001BDA3CAEA00
R8 :0000000000000000 R9 :000001BDA3CAEF00 R10:0000000000000000 R11:00000000122BE5A8
R12:0000000000000000 R13:000000487FBD6000 R14:0000000000000001 R15:0000000000000000
CS:RIP:0033:00007FFB74AB3416 SS:RSP:002B:000000487FEFE140
DS:002B ES:002B FS:0053 GS:002B
Flags:00010213
Exception Parameters: 0000000000000001 0000000000000024
Modules:
[...]
Called from DBUSEAREA(0)
Called from WS:SALVARCONSULTA(725) in pcode.hrb
Called from __RUNCONTROLLER(9) in pcode.hrb
Called from HB_HRBDO(0)
Called from ZEXECUTE(217) in C:/xampp/htdocs/WSH//lib/mercury/mercury.hrb
Called from TROUTE:EXECUTE(566) in C:/xampp/htdocs/WSH//lib/mercury/mercury.hrb
Called from TROUTE:LISTEN(392) in C:/xampp/htdocs/WSH//lib/mercury/mercury.hrb
Called from TAPP:INIT(139) in C:/xampp/htdocs/WSH//lib/mercury/mercury.hrb
Called from MAIN(16) in pcode.hrb
Called from HB_HRBDO(0)
Called from EXECUTE(70) in ..\source\exec.prg
[Tue Mar 23 17:20:37.854706 2021] [mpm_winnt:notice] [pid 18764:tid 584] AH00428: Parent: child process 9676 exited with status 3221225477 -- Restarting.